The academic CLI is a research workflow tool for managing projects, references, notes, experiments, datasets, paper builds, and submission packaging from one command surface.
It is designed around reproducibility and low-friction daily use:
- Scaffold consistent project structures.
- Keep notes, references, and experiments organized.
- Build LaTeX papers with sensible fallbacks.
- Track dataset checksums and environment snapshots.
- Package anonymized or arXiv-ready outputs.
- Use the same capabilities through CLI, TUI, and local web UI.
- Installation
- Quick Start
- Authentication (Browser Login)
- How Project Detection Works
- User Configuration
- Environment Variables
- Command Reference
- Common Workflows
- Troubleshooting
- Development
brew tap academic/tap
brew install academic
academic version# 1) Set your defaults once
academic config set author "Jane Doe"
academic config set email "jane@example.edu"
academic config set license "MIT"
# 2) Create a project
academic init my-paper --template paper --examples
cd my-paper
# 3) Verify local setup
academic doctor
# 4) Start writing and collecting references
academic note today
academic ref search diffusion models
academic ref add 10.1145/3292500.3330701
# 5) Run an experiment and capture environment
academic exp new baseline
academic exp run
academic env snapshot
# 6) Build and package your paper
academic paper build
academic share arxivacademic login implements a browser callback flow:
- Starts a temporary local callback server on
127.0.0.1with a random port. - Generates a one-time
statetoken. - Builds a login URL (default:
https://academic.io/login) with callback and state parameters. - Opens your browser unless
--no-openis set. - Waits for callback query params (
token,state, optionalemail, optionalexpires_at). - Validates state, then saves a local auth session file.
Commands:
academic login
academic login --no-open
academic login --timeout 5m
academic login --login-url "https://academic.io/login"
academic logoutSession storage defaults to:
~/.config/academic/auth.yaml(or$XDG_CONFIG_HOME/academic/auth.yaml)- Override with
ACADEMIC_AUTH_PATH
Notes:
logoutremoves the session file.- If login times out, rerun with a higher
--timeout.
Many commands (notes, refs, data, experiments, paper, sharing) require being inside an academic project.
Project root detection:
- The CLI walks upward from current directory.
- First directory containing
.academic/is treated as project root. - Local metadata is read from
.academic/config.yaml.
If no root is found, commands that need project context return:
not inside an academic project (no .academic/config.yaml found)
User config file path:
ACADEMIC_CONFIG(if set)$XDG_CONFIG_HOME/academic/config.yaml~/.config/academic/config.yaml
Supported keys:
authoremailorcidlicenseeditor
Examples:
academic config list
academic config path
academic config set author "Jane Doe"
academic config set editor "code -w"
academic config get author
academic config unset orcidHow config is used:
inituses configuredauthor,email, andlicensedefaults.noteuses configurededitorifACADEMIC_EDITORis not set.
| Variable | Purpose | Default |
|---|---|---|
ACADEMIC_CONFIG |
Absolute path for user config file | $XDG_CONFIG_HOME/academic/config.yaml or ~/.config/academic/config.yaml |
ACADEMIC_AUTH_PATH |
Absolute path for auth session YAML | $XDG_CONFIG_HOME/academic/auth.yaml or ~/.config/academic/auth.yaml |
ACADEMIC_LOGIN_URL |
Default login page URL for academic login |
https://academic.io/login |
ACADEMIC_EDITOR |
Preferred editor command for note open actions | Falls back to config key editor, then VISUAL, then EDITOR |
VISUAL |
Editor fallback | none |
EDITOR |
Editor fallback | none |
ACADEMIC_NO_AUTO_INSTALL |
Disable automatic Tectonic download in paper build |
auto-install enabled |
ACADEMIC_CACHE_DIR |
Custom cache root; used for engine cache (engines/) |
system user cache directory |
XDG_CONFIG_HOME |
XDG config root for config/auth files | ~/.config |
academic
anonymize
citation
init
update
completion
config
get
list
path
set
unset
data
fetch
list
verify
doctor
env
snapshot
exp
diff
list
new
run
greet
init
login
logout
note
link
list
new
search
today
paper
build
clean
figures
sync
new
wordcount
ref
add
check
cite
export
list
search
share
arxiv
tui
update
version
web
Scaffolds a project from built-in templates.
Templates:
paper(default): LaTeX-oriented research layout.minimal: lightweight Markdown-oriented layout.
Important flags:
-t, --template: template name.-d, --dir: target directory (default./<project-name>).--author,--email,-l, --license.--examples: include starter examples.--no-git: skipgit init.--force: allow non-empty target directory.--list-templates: print template names and exit.
Examples:
academic init thesis-2026 --template paper --author "Jane Doe" --license MIT
academic init notes --template minimal --no-git
academic init my-study --examplesChecks external tools and project structure.
- Required tool:
git. - Optional tools checked:
go, LaTeX engines,biber,pandoc,python,R,jupyter,texcount. - Project checks include presence/type of common files and directories.
- If bibliography exists, performs parse + structural validation.
Flags:
--tools-only--project-only
Subcommands:
config get <key>config set <key> <value>config unset <key>config listconfig path
Flags:
--login-url(default fromACADEMIC_LOGIN_URLorhttps://academic.io/login)--timeout(default3m)--no-open
Behavior details:
- Binds callback on
127.0.0.1:0. - Saves YAML session with token, email, and timestamps.
- Removes the saved session file.
- Safe to run when no session exists.
- Creates or opens
notes/daily/YYYY-MM-DD.md. - Writes frontmatter on first creation.
- Opens editor unless
--no-edit.
- Creates
notes/YYYY-MM-DD-<slug>.md. - Supports repeatable tags via
-t, --tag. - Opens editor unless
--no-edit.
- Recursively lists Markdown files under
notes/.
- Case-insensitive substring search across notes.
- Output format:
path:line: content. - Optional filters:
-t, --tag(frontmatter line contains any tag)-C, --context <n>
- Resolves note IDs via path/date/slug matching.
- Appends wiki link
[[target-slug]]under## Links. - Deduplicates existing link.
-b, --bidirectionaladds reverse link.
Editor resolution order for note commands:
ACADEMIC_EDITORconfig.editorVISUALEDITOR
Accepts:
- DOI (
10.xxxx/...,doi:..., or DOI URL) - arXiv ID (
1706.03762,arXiv:..., arXiv abs URL) - ISBN (
isbn:...or compact/hyphenated)
Behavior:
- Fetches entry metadata from Crossref, arXiv, or Open Library.
- Appends to bibliography file.
- Refuses duplicate citation key.
Flags:
--bib <path>--print(stdout only)
Checks:
- Duplicate keys.
- Missing required fields by entry type.
- Optional DOI reachability when
--doiis set.
Flags:
--bib <path>--doi
- Prints key, entry type, and title summary.
- Prints best-effort APA-style citation for one key.
- Queries Crossref works API.
- Prints DOI, year, authors, and title.
Flag:
-n, --limit(default10)
- Export selected keys or all entries (
--all). - Supported formats:
bibtex,csl-json,ris. - Writes to stdout or
--outfile.
Flags:
-f, --format(defaultbibtex)--all-o, --out--bib
Bibliography path resolution:
- If
--bibis provided, relative path is resolved from project root when possible. - Otherwise first existing file is chosen from:
paper/refs.bibrefs.bibreferences.bibbibliography.bib
- If none exists, default target becomes
paper/refs.bib.
Downloads data and records manifest metadata.
Capabilities:
- Direct URL fetch.
- DOI-based fetch via DataCite with
--doi. - SHA-256 computation and file size capture.
- Upsert to
data/manifest.json.
Flags:
--doi <doi>--to <project-relative-path>--force
- Lists manifest entries (
sha-prefix size path).
- Re-hashes files listed in manifest.
- Reports
OK,MISSING, or checksum mismatch. - Returns non-zero exit on any failure.
Creates experiments/YYYY-MM-DD-<slug>/ with:
config.yamlNOTES.mdrun.sh(executable)results/.gitkeep.gitignorescoped to experiment results
Includes current git SHA when available.
- Lists experiment directories sorted by name.
- Runs chosen experiment
run.sh. - If omitted, runs latest experiment.
- Captures stdout/stderr to
results/run.log. - Writes runtime metadata to
results/env.txt.
- Compares:
config.yamlresults/env.txt- file sets and sizes under each
results/
Captures environment details into results/env.txt, including:
- timestamp, OS, architecture
- git SHA/branch/dirty state
- tool versions (if present)
pip freezego.modrequirements.txt- truncated
renv.lockwhen present
Flag:
--stdoutto print instead of writing file
Build order:
latexmk -pdftectonicpdflatex
If no builder is found:
- Auto-installs a cached Tectonic binary by default.
- Disable auto-install with
--no-auto-installorACADEMIC_NO_AUTO_INSTALL=1.
Flags:
--main <path>(default lookup starts withpaper/main.tex)--no-auto-install
- Removes common LaTeX artifacts (
.aux,.bbl,.log, etc.).
Flag:
--main
- Uses
texcountwhen available. - Falls back to approximate parser over included TeX files.
Flag:
--main
- Mirrors figure assets from source to destination.
- Uses SHA-256 to avoid copying unchanged files.
- Optional delete of destination files absent in source.
Flags:
--src(defaultresults/figures)--dst(defaultpaper/figures)--delete--dry-run
Scaffolds standalone paper directory templates:
ieeeacmelsevierspringerthesis
Flags:
-t, --template(defaultieee)-d, --dir(defaultpaper-<name>)--force
Generated files include main.tex, refs.bib, README.md, sections/, and figures/.
- Creates
CITATION.cfffrom project metadata. - Uses best-effort author name split into
given-namesandfamily-names.
Flag:
--force
- Rewrites citation metadata and updates release date.
For blind submission, rewrites LaTeX content by removing or replacing common identity-bearing fields:
\author{}\affil{}/\affiliation{}/\institute{}\thanks{}\email{}/\orcid{}\address{}- acknowledgements sections/environments
Flags:
--main--out--in-place
Default output is <main>.anon.tex.
Builds a .tar.gz containing paper source and needed assets while skipping PDF/build artifacts.
Flags:
--main--out(defaultdist/arxiv-YYYYMMDD.tar.gz)
- Bubble Tea terminal UI.
- Presents common actions for project, refs, notes, experiments, data, paper, and sharing.
- Executes the same
academicbinary commands under the hood.
- Starts local web UI server (default
127.0.0.1:8765). - Scans root directory for projects (
.academic/folders). - Exposes command execution, file tree browsing, and basic file editing.
Flags:
--addr <host:port>--root <directory>
Generate completion scripts.
Examples:
# bash
source <(academic completion bash)
# zsh
source <(academic completion zsh)
# fish
academic completion fish | source- Self-updates from GitHub releases.
- Works only for non-dev builds (version must not be
dev).
- Prints CLI version.
- Simple greeting command.
-u, --upperfor uppercase output.
academic config set author "Jane Doe"
academic config set email "jane@example.edu"
academic init causality-paper --template paper --examples
cd causality-paper
academic note today
academic ref add 10.1038/nature14539
academic paper buildacademic data fetch --doi 10.5281/zenodo.1234567
academic data verify
academic exp new baseline
academic exp run baseline
academic env snapshot baseline
academic exp diff baseline baselineacademic anonymize --main paper/main.tex --out paper/main.blind.tex
academic share arxiv --main paper/main.tex
academic citation update- Run
academic init <name>first, or cdinto a folder containing.academic/config.yaml.
- Allow auto-install (default), or
- Install
latexmk,tectonic, orpdflatexmanually, or - Pass
--no-auto-installonly if you already have a local engine.
- Increase timeout:
academic login --timeout 10m. - Use
--no-openand open printed URL manually.
- Existing key already in bibliography.
- Use
ref list/ref checkto inspect current entries and resolve conflicts.
- File contents changed since original fetch.
- Re-fetch with
--forceor intentionally update manifest by fetching again.
- Set one of:
ACADEMIC_EDITORacademic config set editor "<command>"VISUAL/EDITOR
- Use
--no-editif you only want file creation.
go build ./...
go test -race ./...go run . --help
go run . init demo- CI builds multi-platform artifacts on release publication.
- Homebrew formula template is in
academic.rb. updaterelies on versioned (non-dev) binaries.
academicis intentionally command-first. TUI and web UI are wrappers over the same command actions.- For command-level details, run
academic <command> --help.