Skip to content

nais/naistrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

126 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Naistrix

Go Reference

Naistrix is an opinionated wrapper around the Cobra library, used when building CLI applications in Go.

Installation

Use go get to fetch the latest version of Naistrix:

go get github.com/nais/naistrix@latest

Usage

Please have a look at the examples directory for usage examples.

Local development

Clone the repository:

git clone git@github.com:nais/naistrix.git
cd naistrix

Install tools

Naistrix uses mise to handle dependencies and tasks. After installing mise run the following command to install tools:

mise install

Make changes

First, create a new branch for your changes:

git checkout -b my-feature-branch

Make the necessary changes to the codebase. When committing your changes, make sure to follow the conventional commit specification. This helps maintain a clean and understandable project history along with a nice automated Changelog.

The repository contains a commit-msg git hook that might be helpful. To enable this you can do the following from the project root:

ln -s ../../script/semantic-commit-hook.sh .git/hooks/commit-msg

There are also several mise tasks that you can use to validate your changes. See all available tasks by running:

mise run

Create pull request

Once you have made your changes and committed them, push your branch and make a pull request against the main branch.

License

MIT, see LICENSE.txt for details.

About

Cobra wrapper for CLI applications in Go

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Contributors