Skip to main content

Interactive CLI for Infinite Craft — combine elements from the terminal

Project description

infinite-craft-cli

PyPI Downloads License Python Tests Publish Chrome Web Store

Interactive CLI for Infinite Craft — combine elements from the terminal. Also available as a browser extension and web trainer.

Originally built on infinite-craft by @sqdnoises. As of v1.0, uses curl_cffi directly.

Installation

pip install infinite-craft-cli

Browser extension

Install the Infinite Craft Trainer from the Chrome Web Store — it loads automatically on neal.fun/infinite-craft. Works in Edge, Brave, and other Chromium browsers.

For other install methods (console snippet, userscript), see the web trainer page.

Usage

Interactive mode

infinite-craft

This opens a REPL where you can combine elements, search discoveries, and more:

craft> Water + Fire
  💨 Water + 🔥 Fire = 💨 Steam

craft> /search steam
  💨 Steam

craft> /help

Non-interactive mode

Most REPL commands are available as subcommands (shorthand operators like +, ++, +|, and * are REPL-only):

infinite-craft combine "Water" "Fire"
infinite-craft search "steam"
infinite-craft list
infinite-craft recipe "Steam"
infinite-craft import "Steam"
infinite-craft export
infinite-craft fill
infinite-craft unfilled
infinite-craft prune
infinite-craft exhaust "Water"
infinite-craft crawl "Water" "Fire"
infinite-craft permute "w*"
infinite-craft with "Water" "fire*"
infinite-craft cross "fire*" "water*"
infinite-craft --version

Commands

Combine & crawl

Shorthand Slash command Description
<element> + <element> /combine <el> + <el> Combine two elements (/combine <el> <el> also works)
<element> ++ <element> /crawl <el> + <el> Combine & crawl until no new discoveries (/crawl <el> <el> also works)

Bulk combine

Shorthand Slash command Description
<element> + | <query> /with <element> <query> Combine element with all matching discoveries (+ | spaced variant also works)
<query> * <query> /cross <query> * <query> Cross-combine matches from both queries (/cross <q> <q> also works for simple queries)
/permute <query> Combine all matching elements with each other
/exhaust <element> Combine element with all discoveries

Query syntax

Used by /search, /with, /permute, /cross, and the +| / * shorthands:

Syntax Meaning
substring Case-insensitive substring (default)
* ? [] fnmatch wildcards (e.g. fire*, mu?)
/pattern/ Regex, case-insensitive (/pattern/; alternation | not supported)
!<query> First discoveries only (e.g. !fire*)
^<query> Legacy alias for !<query>

Other commands

Command Description
/search <query> Search discoveries
/recipe <element> Show shortest recipe from base elements
/list List all discovered elements
/import <element|file.ic> Import from Infinibrowser or .ic save file
/fill Fetch missing recipes from Infinibrowser
/unfilled List elements without recipes
/prune Remove orphan elements Infinibrowser can't fill
/export [path] Export discoveries as .ic save file
/history Show combinations tried this session
/help Show help
/quit Exit

Data storage

Discoveries and recipes are stored in ~/.infinite-craft-cli/:

  • discoveries.json -- all discovered elements
  • recipes.json -- known element combinations
  • export.ic -- default export location

Browser extension / bookmarklet

The browser trainers share the same command syntax and query matching as the Python CLI (wildcards, /regex/, !/^ first-discovery filters, /combine, /with, /cross, and spaced operator delimiters). Browser-only additions: /clear to clear the terminal output, and IndexedDB storage instead of ~/.infinite-craft-cli/.

Development

Run unit tests:

bazel test //tests/...

Run integration tests (hits the real API):

bazel test //tests:test_integration --test_env=INTEGRATION_TESTS=1

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

infinite_craft_cli-1.3.0.tar.gz (77.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

infinite_craft_cli-1.3.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file infinite_craft_cli-1.3.0.tar.gz.

File metadata

  • Download URL: infinite_craft_cli-1.3.0.tar.gz
  • Upload date:
  • Size: 77.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for infinite_craft_cli-1.3.0.tar.gz
Algorithm Hash digest
SHA256 33144874d70e0fea12c4055d6266f53c619f39e9440a094d6583690d9b13b8c1
MD5 428c13d1ad070e59c41efc51f887d593
BLAKE2b-256 667d4c5a6e65a5f6b17b46d9e85755691604c0dc502ec58152c9cf8dde5d1491

See more details on using hashes here.

Provenance

The following attestation bundles were made for infinite_craft_cli-1.3.0.tar.gz:

Publisher: publish.yml on hacker6284/infinite-craft-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file infinite_craft_cli-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for infinite_craft_cli-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f48638d477af169a48abd9f8590f9194c927244e540b17996cdc77dc042b2d5
MD5 a2cd08022e7fb68a8caa896372faeff1
BLAKE2b-256 d778dfa48fa325a9fe050437e498dbffe03f0d209b9e9f4dc5c356c12308472c

See more details on using hashes here.

Provenance

The following attestation bundles were made for infinite_craft_cli-1.3.0-py3-none-any.whl:

Publisher: publish.yml on hacker6284/infinite-craft-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page