Skip to main content

Código's CLI

Through Código CLI, developers can interact with Código Generator. Developers can access the Código CLI from Código Studio or by downloading it from here.

When using from Código Studio, the Código CLI is configured to the PATH of the web-based environment; thus, you can access it from the terminal by going to Terminal -> New Terminal and typing the command codigo.

tip

To use the Código CLI, you must log in using your GitHub account. Learn how here

Commands

login

Log in using your GitHub account.

Usage

codigo login
FlagsUsage
--whoamiPrints the authenticated username
--logoutSign out, the user will need to execute login again

upgrade

Updates the Código CLI to the latest version

Usage

codigo upgrade
FlagsUsage
-c, --checkVerifies if there is a new version available. Doesn't perform any update
-r, --rollbackRollback the update. Fails if no update to rollback is available.

solana

Sub-command to generate programs and client libraries for the Solana blockchain

generate

sub command to generate client libraries or programs

Usage

codigo solana generate /path/to/my/cidl.yaml
FlagsUsage
-a, --anchorGenerates the program or client using the Anchor framework
--disable-diffDisables the diff process for the generated files. Caution: implemented code will be lost
-c, --only-clientGenerates only the TypeScript client library
-p, --only-programGenerates only the program
–-out-clientOutput for the generated client library
–-out-programOutput for the generated program

Join the Código community 💚

Código is a growing community of developers. Join us on Discord and GitHub