Skip to content

Command reference

Run odyn <command> --help for the same information on the command line.

These work on every command:

  • -q, --quiet suppresses the progress spinners.
  • -v, --verbose prints the underlying git output.
odyn init [PATH]

Scaffold a new Odin project in PATH (defaults to the current directory). This writes a main.odin, an ols.json that maps the deps collection, an empty Odyn.lock, a .gitignore, and initializes a git repository.

Flags:

  • --commit-deps commits the contents of deps/ (ignoring each dependency’s own nested .git). By default deps/ is gitignored and restored with odyn sync.
  • --no-init-git skips creating a git repository (one is created by default).
  • --src uses a src/ layout, placing main.odin in src/. By default it goes in the project root.
  • --with-readme also generates a README.md.
  • --license <id> picks the license file. Defaults to mit. One of mit, apache, gpl3, bsd2, bsd3, mpl2, unlicense, zlib, isc, custom.
odyn get <URL> [-- GIT_ARGS...]

Clone a dependency into deps/ and pin its current commit in Odyn.lock. URL is either a full git URL or an owner/repo shorthand resolved against --platform.

Flags:

  • -p, --platform <forge> resolves the shorthand form. Defaults to github. One of github, codeberg, gitlab, sourcehut (sr.ht), bitbucket, gitea, savannah, notabug, disroot, framagit. gitea has no single public instance, so pass a full URL for it.
  • -n, --name <name> sets the folder created under deps/. Defaults to the repository name.
  • -t, --tag <tag> checks out a tag. Use latest for the newest semver tag, or a specific tag such as v1.2.0.
  • Anything after -- is forwarded verbatim to git clone.
Terminal window
odyn get odin-lang/examples
odyn get user/repo -p codeberg -n mydep
odyn get https://codeberg.org/user/repo -t latest
odyn get user/repo -- --depth 1
odyn sync

Restore every dependency listed in Odyn.lock to its pinned commit. Run it on a fresh checkout, or whenever deps/ has drifted.

Flags:

  • -f, --force hard-resets locally modified dependencies to their pinned commit instead of aborting.
  • --skip <name> skips a dependency during the pass. Repeatable.
odyn status

Show the state of each dependency: whether it is present, missing, locally modified, or drifted from its pinned commit. Exits non-zero if anything is off, which makes it useful in CI.

odyn update <NAME> [COMMIT]

Update a dependency and re-pin it in the lockfile. With no COMMIT, it moves to the latest commit; pass a COMMIT to pin a specific one.

Flags:

  • -t, --tag <tag> updates to a tag. Use latest for the newest semver tag, or a specific tag.
  • -b, --branch <branch> tracks a branch: updates to origin/<branch> HEAD and records the branch in the lockfile.
odyn remove <NAME>

Delete a dependency’s folder under deps/ and remove its entry from Odyn.lock.

odyn list <subcommand> [args]

Manage package-list sources. A list is a git repository that describes packages for search and info to query.

odyn list add <REPO>

Add a package list from a repository URL (or a shorthand with --platform).

Flags:

  • -n, --name <name> override the list’s name (defaults to the metadata name or the repository name).
  • -p, --platform <forge> resolves shorthand URLs. Same choices as odyn get --platform.
odyn list remove <NAME>

Remove a package list and delete its cache.

odyn list ls

List all added package lists with their names and repositories.

odyn list packages <NAME>

List every package provided by the named list.

odyn list show <NAME>

Show details about a list: its repository, data source (index file or README), and package count.

odyn list update [NAME]

Re-fetch a list’s cache. With a name, updates only that list; without one, updates every added list.

odyn list rename <OLD> <NEW>

Rename a package list.

odyn search [QUERY]

Search added package lists. Returns every package whose name or repo slug matches the query. With no query, at least one filter flag is required.

Flags:

  • -t, --tag <tag> filter by tag (repeatable; all must match).
  • -l, --license <text> filter by license (substring match).
  • -d, --in-description <text> filter by text in the description.
Terminal window
odyn search anima
odyn search --tag 2d --license MIT
odyn search physics -d collision
odyn info <PATH>

Show details about a package. PATH is a bare identifier (name or repo slug) scanned across all lists, or list:user/repo to narrow the scope.

Terminal window
odyn info anima
odyn info awesome-odin:jakubtomsu/anima
odyn completions <shell>

Generate shell completion scripts. Supports bash, zsh, fish, elvish, powershell, and nushell.

Terminal window
odyn completions fish > ~/.config/fish/completions/odyn.fish
odyn completions bash > /usr/local/share/bash-completion/completions/odyn