- The chia cli cookbook covers the exact commands you need for keys, wallets, and plots — no GUI required.
- Always activate your Python virtual environment before running any CLI commands on Linux and macOS installs.[1]
chia keys generate,chia wallet show, andchia plots createare the three commands every farmer should memorize first.- Multi-key and remote harvester setups require specific flags — skipping them causes silent failures.
- You can chain CLI commands into shell scripts to fully automate plot management and monitoring.
- Use
chia <command> -hat any time to pull up the exact flags for that specific subcommand.[1]
The Chia CLI is the fastest and most reliable way to manage your farm. While the GUI is useful for beginners, serious farmers use the command line for speed, scripting, and full control over keys, wallets, and plots — all from a single terminal window.
Getting Started with the Chia CLI Cookbook
Before you run a single command, you need to understand one rule: on Linux and macOS, you must activate the Python virtual environment first. Navigate to your chia-blockchain directory and run . ./activate.[1] On Windows with the installed GUI client, the CLI is already in your system path and you can skip this step. Get this wrong and every command will fail with a “command not found” error that sends newer farmers chasing the wrong fix for hours.
Once you’re inside the environment, run chia version to confirm everything is working. You should see a version number like 2.x.x. If that prints cleanly, you’re ready to cook.
The Help Flag Is Your Best Friend
Every command in the Chia CLI has a -h flag that prints its full list of options. Running chia plots create -h shows every available flag for plot creation — buffer size, thread count, temporary directories, and more.[1] Make a habit of checking -h before running any command you haven’t used recently. The CLI evolves between versions, and flags occasionally change. This one habit saves more time than any cheat sheet.
Core Service Commands You’ll Use Every Day
The top-level service commands control what’s running on your machine. chia start farmer launches your full node, farmer, harvester, and wallet all at once — the standard startup for a single-machine setup.[2] If you only want the node without farming, use chia start node. To restart a specific service without taking everything down, append -r: for example, chia start harvester -r restarts just the harvester. When you need to shut everything down gracefully before maintenance, chia stop -d all handles it cleanly. And chia show -s gives you a fast node sync summary so you can confirm you’re actually connected to the network before troubleshooting anything else.[1]
Managing Chia Keys from the Command Line
Key management is where the CLI really shines over the GUI. The commands are precise, scriptable, and give you visibility into your key structure that the graphical interface simply doesn’t expose. Your keys are the most critical part of your Chia setup — lose them, and you lose access to your rewards forever. Handle them carefully, store your 24-word mnemonic offline, and never paste it into a chat or unencrypted file.[1]
Generating and Importing Keys
To create a brand-new key pair, run chia keys generate. The CLI will output a 24-word mnemonic seed phrase and a fingerprint.[1] Write that mnemonic down on paper immediately and store it somewhere physically secure. The fingerprint is a short identifier you’ll use in multi-key setups to specify which key a command should target.
If you’re moving to a new machine or restoring from backup, import your existing key with chia keys add. The CLI will prompt you to enter your 24-word mnemonic interactively, which is safer than passing it as a shell argument where it could end up in your command history. After importing, run chia keys show to confirm the key loaded correctly. This command displays your public key fingerprint, your farmer public key, and your pool public key — three distinct values that your plotting and pooling setup both depend on.[3]
Deriving Child Keys for Cold Storage Patterns
One command most farmers skip entirely is chia keys derive child-key -t farmer. This derives a dedicated farmer key from your master key, which is useful for setups where you want to separate your farming key from your spending key.[1] Your master key can generate XCH, so keeping it cold while using a derived farmer key for day-to-day operations is a legitimate security layer. Run chia keys derive -h to explore the full derivation options including wallet keys, pool keys, and observer-only keys.
Working with Multiple Keys and Fingerprints
If you’re running multiple wallets or testing configurations, you’ll have more than one key stored. Use the --fingerprint flag to target a specific key in any command that touches wallet or key data. For example, chia wallet show --fingerprint 1234567890 shows the balance for that specific key rather than your default.[5] Without specifying a fingerprint in a multi-key environment, the CLI picks the first key it finds — which may not be the one you want.
| Task | Command | When to Use It |
|---|---|---|
| Create new keys | chia keys generate | New install or new wallet setup |
| Import existing key | chia keys add | Migrating machines or restoring backup |
| View stored keys | chia keys show | Confirm keys loaded, grab farmer pubkey |
| Derive farmer key | chia keys derive child-key -t farmer | Cold storage / key separation setups |
| Target specific key | --fingerprint [id] flag | Multi-key environments |
| Delete a key | chia keys delete --fingerprint [id] | Removing old or test keys |
Plot Management: The Core of the Chia CLI Cookbook
Plotting is where farmers spend most of their CLI time, and the commands here have the most flags to learn. Getting plot creation right from the start saves you days of wasted SSD writes and failed plots. The basic command is chia plots create -k 32 -b 4000 -t /tmp -d /plots. Breaking that down: -k 32 sets the plot size (k32 is the standard), -b 4000 allocates 4 GB of RAM buffer, -t points to your temporary drive (ideally a fast NVMe SSD), and -d is the final destination where the completed plot lands.[3] Note: to use advanced plotters like BladeBit or madMAx within the Chia client, the newer command is chia plotters bladebit or chia plotters madmax respectively.
Key Plot Creation Flags Worth Knowing
Beyond the basics, a few flags dramatically affect your plotting performance and output. The -r flag sets the number of CPU threads to use — more threads can speed up phase 1, but beyond a certain point you hit diminishing returns depending on your CPU. The -u flag controls the number of buckets used during sorting phases; the default is 128, but lowering it can help if you’re tight on temporary space. If you’re plotting for a pool, you’ll add -c <pool_contract_address> to tie the plot to your Plot NFT.[4] Forgetting this flag and plotting without it means those plots can only be used for solo farming, not pooling.
Checking and Verifying Your Plots
After plots are created, validate them with chia plots check -n 30. This runs 30 challenges against each plot and reports a pass rate. A healthy plot should pass at least 28 out of 30 challenges.[1] If you’re seeing plots consistently passing fewer than 25, something went wrong during creation — corrupted temp files, premature termination, or hardware errors. You can filter by directory using -g /path/to/specific/directory so you don’t have to re-check your entire farm every time you add new plots. Catching bad plots early prevents them from silently dragging down your farming efficiency for months.
Adding Plot Directories and Viewing Your Farm
Once plots are complete and verified, register the directory with your farmer using chia plots add -d /path/to/plots.[1] Then run chia plots show to confirm the directory is in your config. The harvester won’t look for plots anywhere that hasn’t been explicitly added, so this step isn’t optional — it’s just easy to forget after a long plotting session. After adding directories, a quick chia farm summary shows your total plot count, total farmed space, and any recent rewards, giving you a clean snapshot of where your farm actually stands.[2]
| Plotter Type | CLI Entry Point | Best For | RAM / Temp Required (k32) |
|---|---|---|---|
| Chia reference plotter (ChiaPoS) | chia plots create | General use, low hardware bar | ~4 GB RAM, ~256 GB temp |
| BladeBit (RAM mode) | chia plotters bladebit ramplot | Speed, high-volume plot farms | 416 GB system DRAM required |
| madMAx plotter | chia plotters madmax | NVMe-heavy setups, fast SSD | ~256 GB total temp space |
Wallet Commands Every Chia Farmer Needs
The wallet commands handle your XCH balance, incoming rewards, and outbound transactions. chia wallet show is your go-to: it prints your confirmed balance, unconfirmed balance, and sync status.[5] If the wallet shows “Not Synced,” your transactions and incoming rewards won’t process correctly, so always check sync status before assuming something is wrong with your farming earnings.
Getting a Receive Address and Sending XCH
To generate a fresh receive address, run chia wallet get_address. Each time you call it, the CLI returns a new unique address derived from your key. This is intentional — using a fresh address for each transaction improves privacy on the blockchain. To send XCH, the command is chia wallet send -a [amount] -t [target_address] -f [fee]. The fee is specified in mojos (the smallest unit of XCH, where 1 XCH = 1,000,000,000,000 mojos).[5] Setting a fee of 0 works in low-congestion periods, but during busy mempool times a small fee gets your transaction confirmed faster.
Using RPC for Programmatic Wallet Access
For farmers building dashboards or automating balance checks, the chia rpc wallet get_wallet_balance command returns a clean JSON object you can pipe into scripts.[5] This is how custom Grafana monitoring setups pull wallet data without needing the GUI. Running chia rpc -h shows all available RPC endpoints — it’s a layer of the CLI that most farmers never discover, but it’s extremely powerful for automation.
The Chia CLI’s RPC interface turns a farming node into a fully scriptable data source — every balance, reward, plot count, and sync status can be queried programmatically and fed into any monitoring tool you already use.
Plot NFTs and Pool Management via CLI
If you’re pooling rather than solo farming, Plot NFTs are the mechanism that connects your plots to a pool on-chain. To create one, run chia plotnft create -u //[pool_url].[4] For solo farming with the ability to switch pools later, use chia plotnft create -s local. The NFT creates an on-chain contract address — that contract address is what you pass to chia plots create -c [contract_address] when plotting. Run chia plotnft show at any time to see your NFT status, the pool it’s pointing to, current points, and your pool contract address.
Switching pools doesn’t require re-plotting — you just run chia plotnft join --id [nft_id] -u [new_pool_url] and your existing NFT plots point to the new pool after a short on-chain delay.[4] This is one of the most underappreciated features of Chia’s pooling architecture compared to other blockchains.
Scripting and Automation with the Chia CLI
The real power of a CLI over a GUI is that commands are composable. You can write a simple bash script that starts your farmer, checks farm summary, and logs the output — all without touching a mouse. A basic monitoring loop might look like: run chia farm summary, pipe the output to a log file with a timestamp, and set that script to run on a cron job every hour. Add chia show -s to the same script to catch node desync events before they cost you farming time.[2]
For farmers managing multiple machines, the harvester-only setup is controlled entirely from the CLI. On each remote machine, configure it with chia init, add the farmer’s CA certificate, then run chia start harvester. The remote harvester connects back to your main farmer node automatically without requiring a full node or wallet on each machine — saving both compute resources and storage.[1] This is documented in Chia’s official farming setup guide and is a standard configuration for larger farms running plots across multiple drives on separate machines.
Conclusion
The Chia CLI is not intimidating once you understand the recipe. Keys, wallets, and plots each have their own command group, and every group follows the same pattern: a main command, subcommands, and -h to explore. Start with chia keys generate, get your plots created and verified, add your directories, and let chia farm summary be your daily health check. As your farm grows, layer in Plot NFT management, remote harvesters, and scripted automation. The farmers who master the CLI are the farmers who scale — because everything becomes repeatable, auditable, and faster than any GUI will ever be. If you want to go deeper on the smart contract layer that makes Chia’s unique farming model possible, explore our guide on Chialisp and how it’s transforming blockchain smart contracts.
Chia CLI Cookbook FAQs
What is the chia cli cookbook and who is it for?
The chia cli cookbook is a practical reference of the most important Chia command-line interface commands for managing keys, wallets, and plots. It’s designed for Chia farmers who want more control and speed than the GUI provides, whether they’re running a single machine or a multi-machine farm.
How do I use the chia cli cookbook to start farming from scratch?
Using the chia cli cookbook to start farming from scratch means running three commands in order: chia keys generate to create your keys, chia plots create to build your first plot, and chia start farmer to launch your farming services. Once those are done, chia farm summary confirms everything is running.
What’s the difference between chia plots add and chia plots create?
chia plots create actually builds a new plot file from scratch, which takes time and disk I/O. chia plots add -d /path simply tells your farmer to look for already-existing plot files in that directory — it’s just a config update, not a plotting operation.
How do I check if my Chia wallet is synced from the CLI?
Run chia wallet show and look for the sync status in the output. If it shows “Synced,” your wallet is current and ready to send or receive XCH. If it shows “Not Synced,” wait for the node to catch up before making any transactions.
Can I switch pools without re-plotting using the Chia CLI?
Yes — you can switch pools without re-plotting using the chia plotnft join command with your NFT ID and the new pool URL. Your plots stay valid because they’re tied to your Plot NFT contract address, not the pool itself, so the switch happens on-chain with no new plotting required.
