Beton
← Landing pageCLI documentation / v0.5.0
GitHub ↗

Local-first command layer

Beton CLI Docs

Beton is a local-first command-line tool for opening apps and URLs, searching the web, saving notes, running timers, reading the clipboard, inspecting the machine, and controlling selected system actions.

Everything runs on your computer. There is no account, server, API key, or cloud storage requirement for core commands. The recommended distribution path is npm install -g beton-cli; the wrapper downloads the matching official source release, creates an isolated Python runtime, and exposes the short beton command on Windows, macOS, and Linux. A direct GitHub source checkout remains available for contributors.

Installation #

Beton requires Python 3.10 or later. The recommended path uses the npm wrapper, which also requires Node.js 18+ and npm. It is not distributed as a PyPI package: do not run pip install beton or pip install beton-cli. The wrapper downloads the official tagged source release and installs it locally into an isolated runtime.

Recommended path

Use npm for the shortest installation. It does not require Git, PowerShell activation, or a permanent execution-policy change. Beton still uses Python 3.10+ for its local backend.

Recommended npm installation #

Install the published npm wrapper from ordinary PowerShell, Command Prompt, macOS Terminal, or Linux shell. The wrapper downloads the official v0.5.0 backend release and creates an isolated runtime in the user data directory.

All platforms · npm
npm install -g beton-cli
beton doctor
beton --version
Windows-safe

No Activate.ps1, VS Code terminal, or permanent PowerShell execution-policy change is required. If Python is not installed, install Python 3.10+ from python.org, then rerun the npm command.

Prerequisites #

Check that Python and pip are available in the shell where you plan to install Beton.

Check prerequisites
python --version
python3 --version
pip --version

Alternative: install the published source release #

Linux / macOS · v0.5.0
git clone --branch v0.5.0 --depth 1 https://github.com/itsjustayush/beton-cli.git
cd beton-cli
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
beton doctor
Windows PowerShell · v0.5.0 · one-command installer
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\install.ps1

# Open a new VS Code / PowerShell terminal
beton doctor
beton --version
Windows PowerShell · direct executable fallback
git clone --branch v0.5.0 --depth 1 https://github.com/itsjustayush/beton-cli.git
Set-Location beton-cli
py -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\beton.exe doctor

The installer uses pip only as the local build installer for the cloned source tree. It does not download Beton from PyPI. It creates a user-level beton command shim in %USERPROFILE%\bin and adds that directory to your user PATH. Open a new terminal after installation. If Git prints a nonfatal annotated-tag warning but exits successfully and switches to a commit, the shallow release checkout succeeded.

Development install #

Optional test dependencies
python -m pip install -e ".[dev]"

For a quick checkout without installing an editable package, run the module directly from the repository:

Run from source
PYTHONPATH=src python -m beton --help
Custom data location

Set BETON_HOME before invoking Beton to isolate tests or keep local data in a directory of your choice.

Quickstart #

Once installed, Beton keeps the everyday workflow intentionally small: see the interface, open something, search, save a note, run a timer, and inspect the environment.

01

Meet the interface

Run Beton without arguments for the brand screen and examples. Use beton help for an example-driven overview, or append --help to any command for its full option reference.

Explore
beton
beton help
beton open --help
beton search --help
02

Open an app, URL, file, or folder

Use aliases, direct URLs, filesystem paths, or application names. Prefix with --dry-run when you want to verify resolution before launching anything.

Open
beton open chrome
beton open https://github.com
beton --dry-run open ~/Documents
03

Search the web

Queries are URL-encoded and opened in your configured browser. Choose a search engine or use an explicit browser for private mode.

Search
beton search "python tutorials"
beton search "beton-cli" --engine github
beton search "private query" --browser chrome --incognito
04

Capture a note

Notes are appended to a local Markdown file with an ISO 8601 timestamp. Add a tag to make entries easier to scan.

Notes
beton note "finish project" --tag work
beton today
beton path --kind notes
05

Run a focus timer

Use plain minutes or a unit suffix. The timer occupies the foreground terminal until completion; press Ctrl+C to stop it early.

Timer
beton timer 25m --label Focus
Safe exploration

Add --dry-run to external actions to see the resolved target, URL, browser, or system action without changing external state.

beton open #

beton open is the universal launcher. Pass a URL, configured alias, filesystem path, or bare application name and Beton resolves it to the appropriate local action.

Syntax #

Command
beton open <target> [--browser BROWSER] [--incognito]
beton --dry-run open <target>
targetrequired · string

The URL, alias name, filesystem path, or application name to open.

--browserdefault: default

Browser for URL targets. Supported values are default, chrome, edge, and firefox. An explicit browser is required for incognito mode.

--incognitoboolean flag

Open a URL in a private window. It is ignored for application and filesystem targets and rejected when the browser is default.

Target resolution order #

Beton checks the input in order and stops at the first match.

OrderTarget typeBehavior
1Direct URLInputs beginning with http:// or https:// open directly.
2Named aliasCase-insensitive aliases use their configured kind and value.
3Filesystem pathExisting paths after tilde expansion open with the OS default handler.
4Application nameAnything else is treated as an application or executable name.

Inputs that look like paths but do not exist are rejected rather than guessed. This prevents a typo such as ./reports from silently becoming an application launch.

Examples #

URLs, aliases, paths, and apps
beton open https://github.com
beton open https://github.com --browser chrome
beton open https://github.com --browser firefox --incognito

beton open chrome
beton open youtube
beton open github

beton open ~/Documents
beton open ./report.pdf
beton open /etc/hosts

beton open spotify
beton open code
beton open slack

Built-in aliases #

AliasKindValue
chromeappchrome
codeappcode
spotifyappspotify
youtubeurlhttps://www.youtube.com
githuburlhttps://github.com
figmaurlhttps://www.figma.com

beton note and beton today #

Notes are local, append-only Markdown entries. They are not uploaded or synced by Beton. Use beton today to review entries written on the current date.

Syntax and flags #

Commands
beton note <text> [--tag TAG]
beton today
textrequired · string

Content to save. Quote multi-word notes. Empty note text is rejected.

--tagoptional · string

A label for project, context, or any categorization scheme you prefer.

Examples and file format #

Capture and review
beton note "finish the project proposal"
beton note "review chapter 3" --tag study
beton note "deploy to staging" --tag work
beton note "buy groceries" --tag personal
beton today

Each entry includes an ISO 8601 timestamp with timezone offset. Tagged entries include the tag inline as a Markdown code span.

notes.md
- **2024-06-14T09:32:01+05:30** `#work` — deploy to staging
- **2024-06-14T09:35:08+05:30** — finish the project proposal
Storage

Notes live in notes.md inside the Beton data directory. Run beton path --kind notes to print the exact path.

beton timer #

The timer runs a foreground countdown in the current terminal. It displays progress at the start, every completed minute, and during the final five seconds before announcing completion.

Syntax
beton timer <duration> [--label LABEL]
durationrequired · string

A plain integer is interpreted as minutes. Suffixes include s/sec/secs, m/min/mins, and h/hr/hrs.

--labeloptional · string

Label displayed during the countdown, useful for naming a Pomodoro block or focus session.

FormatExampleMeaning
Plain number2525 minutes
Minutes25m, 25min, 25mins25 minutes
Seconds90s, 90sec, 90secs90 seconds
Hours2h, 2hr, 2hrs2 hours
Examples
beton timer 25
beton timer 25m --label "Focus Session"
beton timer 5m --label "Short Break"
beton timer 90s
beton timer 2h --label "Deep Work"

# Preview without waiting
beton --dry-run timer 25
Cancel

The timer occupies the foreground terminal until completion. Press Ctrl+C to cancel it early.

Utility commands #

Utilities inspect the local environment. They are designed to be read-only: they do not modify configuration, write notes, kill processes, or execute destructive actions.

beton clip

clipboard

Print the current text clipboard. Output is capped at 2,000 characters by default.

Syntax and examples
beton clip
beton clip --full
beton --dry-run clip

Linux typically requires xclip or xsel. macOS and Windows use native mechanisms. The --full flag disables truncation.

beton path

storage

Show the data directory, config file, or notes file path.

Syntax and examples
beton path
beton path --kind data
beton path --kind config
beton path --kind notes

beton apps

aliases

List configured application aliases and report whether each executable is detected on PATH. URL aliases are managed separately in configuration.

Example
beton apps

Alias     Target          Status
chrome    google-chrome   detected
code      code            detected
spotify   spotify         not on PATH

beton find

filesystem

Find files below a root directory using a glob pattern. The root defaults to your home directory and results default to 50.

Syntax and examples
beton find <pattern> [--in ROOT] [--limit N]
beton find "*.pdf"
beton find "*.md" --in ~/Documents
beton find "*.py" --in ~/projects --limit 20
patternrequired · string

Filename or glob pattern. Quote it so the shell does not expand it before Beton receives it.

--indefault: home directory

Directory below which the search runs.

--limitdefault: 50 · max: 500

Maximum number of matching paths to display.

beton process

process listing

List running processes with optional case-insensitive name filtering. Beton reports processes but never kills or changes them.

Syntax and examples
beton process [QUERY] [--limit N]
beton process
beton process chrome
beton process python --limit 10
QUERYoptional · string

Substring filter applied to process names.

--limitdefault: 50 · max: 200

Maximum processes to display.

beton doctor

diagnostics

Inspect Python, operating system, data directory status, path opener availability, and detected browsers.

Run diagnostics
beton doctor
beton --plain doctor

Run it immediately after installation and again when a feature fails. Missing optional capabilities do not prevent unrelated commands from working.

beton system #

Trigger a selected OS-level session or power action. Beton runs with the launching user's permissions and uses a confirmation prompt for disruptive actions by default.

Syntax
beton system <action> [--yes]
beton --dry-run system <action>
ActionEffectConfirmation
lockLock the screen or session.No prompt.
sleepSuspend the system.Required unless --yes.
logoutEnd the current user session.Required unless --yes.
restartReboot the computer.Required unless --yes.
shutdownPower off the computer.Required unless --yes.
Examples
beton system lock
beton system sleep --yes
beton --dry-run system restart
beton system shutdown --yes
Safety model

Use --dry-run before disruptive actions. Beton does not elevate to administrator or root; permission errors depend on your platform configuration.

beton config #

View or update local JSON configuration. The current CLI supports top-level settings with show and set.

Syntax and examples
beton config show
beton config set <key> <value>

beton config set browser chrome
beton config set search_engine duckduckgo
beton config set plain true
beton --verbose config set browser firefox

Values of true and false are parsed as booleans. Other values remain strings. Configuration changes are written immediately to the local config file.

Configuration boundaries

The CLI accepts top-level keys defined by Beton, including browser, search_engine, style, and plain. Edit the JSON directly when adding or changing alias entries.

beton help, beton version, and beton --version #

Use help and version metadata to understand the installed CLI. The read-only --version flag prints the current version; version --upgrade refreshes an npm installation through npm or safely upgrades an official source checkout.

Commands
beton help
beton --help
beton open --help
beton search --help
beton version
beton --version
# Output example: BETON 0.5.0

beton help presents a compact table of core commands and examples. --help shows command-specific arguments and flags. beton version prints the installed version without changing anything. Running beton by itself shows the brand screen; beton beton is not a valid command.

beton version --upgrade #

When Beton was installed with npm, this command updates the global npm wrapper and its isolated Python runtime. When Beton was installed from the official GitHub source checkout, it updates the checkout and refreshes the active Python environment without a manual reinstall:

Upgrade safely · Linux / macOS
beton version --upgrade
beton version --upgrade --yes
beton --dry-run version --upgrade
Upgrade safely · Windows PowerShell
beton version --upgrade
beton version --upgrade --yes
beton --dry-run version --upgrade

# No-PATH fallback
.\.venv\Scripts\beton.exe version --upgrade

For npm installations, the upgrade uses npm install --global beton-cli@latest. For source checkouts, it is limited to the official itsjustayush/beton-cli remote on the main branch; it refuses to overwrite uncommitted changes, uses a fast-forward-only pull, asks for confirmation by default, and reinstalls the updated local source into the active Python environment. --dry-run previews the operation; --yes skips the confirmation prompt.

Settings #

Beton stores its settings locally in JSON. You can print them with beton config show and change them with beton config set.

KeyDefaultAccepted valuesPurpose
browserdefaultdefault, chrome, edge, firefoxDefault browser for URL actions.
search_enginegooglegoogle, bing, duckduckgo, youtube, github, mapsDefault engine for searches.
styledefaultStyle nameControls Rich-rendered display style.
plainfalsetrue, falseDisables color and decorative Rich formatting.
Configure defaults
beton config set browser firefox
beton config set search_engine duckduckgo
beton config set plain true
beton config show

Aliases #

Aliases let you assign short names to applications, URLs, and folders. Pass the alias to beton open instead of typing the full target.

KindWhat it opensExample value
urlA URL in the configured browser.https://docs.example.com
appAn executable resolvable on PATH.code
pathA file or folder using the OS default handler./home/user/notes

Alias entries live under the aliases key in config.json. The application aliases are listed by beton apps; URL and path aliases are managed directly in the JSON file.

config.json
{
  "aliases": {
    "docs": { "kind": "url", "value": "https://docs.example.com" },
    "notes": { "kind": "path", "value": "/home/user/notes" },
    "terminal": { "kind": "app", "value": "wt" }
  }
}
Use aliases
beton apps
beton open docs
beton open notes
beton open terminal

Data storage #

Beton is local-first. Its core footprint consists of a configuration file and a Markdown notes file in the platform's standard application-data directory.

PlatformDefault data directory
Linux~/.config/beton
macOS~/Library/Application Support/Beton
Windows%APPDATA%\Beton
FileContents
config.jsonSettings and aliases, written by config changes or direct edits.
notes.mdTimestamped notes appended by beton note.
Inspect and override paths
beton path
beton path --kind config
beton path --kind notes

BETON_HOME=/tmp/beton-test beton note "isolated test note"
BETON_HOME=/mnt/external/beton beton path
Privacy

Beton does not upload notes, configuration, or command results. Network access occurs only when you explicitly request a web action such as search or opening a URL.

Browser control #

Choose a browser per command or save a persistent default. Explicit browser selection is required when you want private browsing.

Per-command selection
beton search "python docs" --browser chrome
beton search "python docs" --browser edge
beton search "python docs" --browser firefox
beton open https://github.com --browser firefox

beton config set browser chrome
ValueBehavior
defaultDelegates to the operating system's default browser.
chromeDirectly launches Google Chrome if detected.
edgeDirectly launches Microsoft Edge if detected.
firefoxDirectly launches Mozilla Firefox if detected.
Private mode

Use --incognito only with an explicit browser, for example --browser chrome --incognito. It is intentionally unavailable with --browser default.

Dry run #

--dry-run is a global flag placed immediately after beton. It describes an action and exits without opening browsers, writing files, or sending system commands.

Preview actions
beton --dry-run open https://github.com
beton --dry-run search "electrostatics"
beton --dry-run system restart
beton --dry-run timer 25
beton --dry-run clip

Dry runs are useful for checking URL and alias resolution, verifying configured browser and search engine behavior, inspecting system commands before a restart or shutdown, and testing scripts safely.

Command groupDry-run behavior
External actionsopen, search, system, timer, and clip report what they would do.
Read-only commandstoday, doctor, and path already have no side effects.

Plain mode #

Rich formatting is useful in interactive terminals, but scripts, logs, CI runners, and minimal shells often need undecorated text. Use --plain for one invocation or save plain=true permanently.

Enable plain output
beton --plain doctor
beton --plain note "meeting notes"
beton --plain today

beton config set plain true
beton config set plain false

The content stays the same; only panels, colors, icons, and other decorative Rich formatting are removed.

Shell scripts

Capture output without ANSI escape codes leaking into variables or downstream commands.

Log files

Write readable, artifact-free logs for later review.

CI/CD

Keep build-agent output clean and parseable.

Minimal terminals

Maintain legibility in SSH sessions and stripped-down environments.

Global flags #

Global flags appear before the subcommand and affect the invocation consistently.

Usage pattern
beton [GLOBAL FLAGS] <command> [command args and flags]
FlagPurposeExample
--dry-runDescribe external actions without performing them.beton --dry-run system sleep
--plainDisable Rich formatting.beton --plain doctor
--verboseShow additional execution details, including updated config output.beton --verbose config set browser chrome
--versionPrint the current version and exit.beton --version
--helpShow top-level or command-specific help.beton search --help
Combine flags
beton --dry-run --plain search "test query"
Flag placement

Global flags must come before the subcommand. For example, use beton --dry-run search "query", not beton search "query" --dry-run.

Troubleshooting #

When in doubt, start with beton doctor. It reports Python, platform, data-directory, path-opener, and browser capabilities in one place.

beton: command not found #

Beton may not be installed in the active virtual environment, or the environment’s script directory may not be on PATH. Beton is installed from the official GitHub source release, not from PyPI.

Repair from the official checkout
cd beton-cli
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
python -m beton --help

# Confirm the installed source version
beton --version

On Windows PowerShell, activate with \.\.venv\Scripts\Activate.ps1. If you are using a development checkout, replace python -m pip install -e . with python -m pip install -e ".[dev]".

Clipboard access fails #

Linux clipboard access typically needs xclip or xsel. Install one with your package manager, then rerun beton doctor.

Ubuntu / Debian
sudo apt install xclip
# or
sudo apt install xsel

Browser not detected #

Explicit browser values require Beton to locate the browser executable. Run beton doctor, ensure the executable is installed and discoverable on PATH, or use --browser default as a fallback.

--incognito is rejected #

Private mode requires a named browser. Use one of the following forms:

Valid private searches
beton search "query" --browser chrome --incognito
beton search "query" --browser firefox --incognito
beton search "query" --browser edge --incognito

System action returns permission denied #

Sleep, shutdown, and restart depend on platform permissions. First inspect the command with dry run. Then review your platform's policy configuration rather than routinely running Beton as root.

Inspect safely
beton --dry-run system sleep
beton --dry-run system shutdown

Diagnostics show missing capabilities #

Missing capabilityAffected featureTypical fix
clipboard on Linuxbeton clipInstall xclip or xsel.
chrome, firefox, or edgeExplicit --browserInstall the browser and expose its executable on PATH.
xdg-open on LinuxOpening files and URLsInstall xdg-utils through your package manager.

Notes do not appear in beton today #

beton today filters by the current date. Check the data directory and timestamps, especially if BETON_HOME differs between terminal sessions.

Linux / macOS · inspect notes location
beton path
printf '%s\n' "$BETON_HOME"
Windows PowerShell · inspect notes location
beton path
$env:BETON_HOME

Older notes remain in the Markdown file even though they are not shown by today.