-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/binary name, readme, and versioning updates (#25)
* rename binary to astria-cli-go. update readme with instructions for running from gh release * just linting commands. markdown lint conf * new action to create release on git tag push. refactor existing release action to pass ldflags * rename to astria-go * fix format of ldflag. remove create-release action * strings * strings * strings * strings * correct path for var * use ref name instead of full ref
- Loading branch information
1 parent
4dae514
commit 786e51b
Showing
6 changed files
with
88 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"MD013": { | ||
"line_length": 80, | ||
"code_block_line_length": 120, | ||
"tables": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,45 @@ | ||
# The Astria Development CLI | ||
# The Astria CLI | ||
|
||
The `astria-dev` cli is a tool designed to make local rollup development as | ||
simple and dependency free as possible. | ||
The `astria-go` cli is a tool designed to make local rollup development as | ||
simple and dependency free as possible. It provides functionality to easily run | ||
the Astria stack and interact with the Sequencer. | ||
|
||
# Locally Build the CLI | ||
## Install and Run CLI from GitHub release | ||
|
||
The CLI binaries are available for download from the | ||
[releases page](https://github.com/astriaorg/astria-cli-go/releases). There are | ||
binaries available for macOS and Linux, for both x86_64 and arm64 architectures. | ||
|
||
```bash | ||
# download the binary for your platform, e.g. macOS silicon | ||
curl -L https://github.com/astriaorg/astria-cli-go/releases/download/v0.3.0/astria-cli-v0.3.0-darwin-arm64.tar.gz \ | ||
--output astria-go.tar.gz | ||
# extract the binary | ||
tar -xzvf astria-go.tar.gz | ||
# run the binary and check version | ||
./astria-go version | ||
|
||
# you can move the binary to a location in your PATH if you'd like | ||
mv astria-go /usr/local/bin/ | ||
``` | ||
|
||
## Locally Build and Run the CLI | ||
|
||
Dependencies: (only required for development) | ||
|
||
- [GO](https://go.dev/doc/install) | ||
- [just](https://github.com/casey/just) | ||
|
||
``` | ||
```bash | ||
git clone [email protected]:astriaorg/astria-cli-go.git | ||
cd astria-cli-go | ||
just build | ||
just run "dev init" | ||
just run "dev run" | ||
``` | ||
|
||
This will download, configure, and run the following binaries of these applications: | ||
This will download, configure, and run the following binaries of these | ||
applications: | ||
|
||
| App | Version | | ||
| ---------------- | ------- | | ||
|
@@ -38,21 +59,23 @@ Astria's apis correctly. | |
|
||
Requires go version 1.20 or newer. | ||
|
||
You may also need to update your `gopls` settings in your editor for build tags to allow for | ||
correct parsing of the build tags in the code. This will depend on your IDE, but | ||
for VS Code you can open your settings and add: | ||
You may also need to update your `gopls` settings in your editor for build tags | ||
to allow for correct parsing of the build tags in the code. This will depend on | ||
your IDE, but for VS Code you can open your settings and add: | ||
|
||
``` | ||
"gopls": { | ||
"buildFlags": ["-tags=darwin arm64 amd64 linux"] | ||
```json | ||
{ | ||
"gopls": { | ||
"buildFlags": ["-tags=darwin arm64 amd64 linux"] | ||
} | ||
} | ||
``` | ||
|
||
The cli is built using [Cobra](https://github.com/spf13/cobra). Once you've | ||
pulled the repo you can install the `cobra-cli` as follows to add new commands | ||
for development: | ||
|
||
``` | ||
```bash | ||
# install cobra-cli | ||
go install github.com/spf13/cobra-cli@latest | ||
# add new command, e.g. `run` | ||
|
@@ -61,12 +84,14 @@ cobra-cli add <new-command> | |
|
||
### Available Commands | ||
|
||
| Command | Description | | ||
| --------------- | ----------------------------------------------------------------------------------- | | ||
| `version` | Prints the cli version. | | ||
| `help` | Show help. | | ||
| `dev` | Root command for cli development functionality. | | ||
| `dev init` | Downloads binaries and initializes the local environment. | | ||
| `dev run` | Runs a minimal, local Astria stack. | | ||
| `dev clean` | Deletes the local data for the Astria stack. | | ||
| `dev clean all` | Deletes the local data, downloaded binaries, and config files for the Astria stack. | | ||
| Command | Description | | ||
|----------------------------|-------------------------------------------------------------------------------------| | ||
| `version` | Prints the cli version. | | ||
| `help` | Show help. | | ||
| `dev` | Root command for cli development functionality. | | ||
| `dev init` | Downloads binaries and initializes the local environment. | | ||
| `dev run` | Runs a minimal, local Astria stack. | | ||
| `dev clean` | Deletes the local data for the Astria stack. | | ||
| `dev clean all` | Deletes the local data, downloaded binaries, and config files for the Astria stack. | | ||
| `sequencer create-account` | Generate an account for the Sequencer. | | ||
| `sequencer get-balance` | Get the balance of an account on the Sequencer. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters