Skip to content

Install

There are three ways to use in-1, from nothing-to-install to permanent. They all use the same machinery; pick the one that fits.

Try it: nothing to install

Source the script served by in-1.cc with the tools you want:

source <(curl -sL in-1.cc) rust node
curl -sL in-1.cc | source - rust node

The bootstrap clone goes in ${TMPDIR:-/tmp}/in-1/bootstrap. Tools install alongside an existing in-1, or under ${TMPDIR:-/tmp}/in-1 when no installed in-1 exists. Their wrappers always go in PREFIX/bin and are activated in your current shell. Pass --temp to force the temporary prefix even with a persistent in-1. Pass -q or --quiet for silent use in a script:

source <(curl -sL in-1.cc) -q rust node

Failures still print their diagnostics and return a nonzero status.

Install the in-1 command

in-1 is itself one of the tools, so the same one-liner installs it:

source <(curl -sL in-1.cc) in-1
curl -sL in-1.cc | source - in-1

Now you have the in-1 command, its man page and tab completion in this shell:

in-1 rust node    # install tools into this shell session
in-1 --list       # see all available tools
in-1 --update     # update in-1
in-1 --help       # or: man in-1
in-1 <TAB><TAB>   # tab completion

On a fresh machine it lives at /tmp/in-1/bin/in-1 and installs tools into that same public bin directory. It can be asked for together with other tools: source <(curl -sL in-1.cc) in-1 rust node.

For keeps

Install it under ~/.local like any other tool:

in-1 --local in-1

That writes ~/.local/bin/in-1. Done through the one-liner (source <(curl -sL in-1.cc) --local in-1, or the fish form) it also sets up the current shell on the spot. For the shell function, man page and tab completion in every new shell, let the command point your shell rc file at its own .rc:

echo 'source <(in-1 --rc)' >> ~/.bashrc
echo 'source <(in-1 --rc)' >> ~/.zshrc
echo 'in-1 --rc | source' >> ~/.config/fish/config.fish

The line goes through the in-1 on PATH, so it keeps working when in-1 --local in-1 installs a newer version. Subsequent in-1 rust node calls install wrappers into ~/.local/bin too. State lives in ~/.local/share/in-1/local, separate from the installed tools.

From a clone

Or clone the repo once and source its .rc from your shell rc file:

git clone https://github.com/in-1-cc/in-1 ~/.in-1
echo 'source ~/.in-1/.rc' >> ~/.bashrc
git clone https://github.com/in-1-cc/in-1 ~/.in-1
echo 'source ~/.in-1/.rc' >> ~/.zshrc
git clone https://github.com/in-1-cc/in-1 ~/.in-1
echo 'source ~/.in-1/.rc' >> ~/.config/fish/config.fish

~/.in-1 is just a suggestion; any directory works. .rc sets IN1_ROOT to wherever the clone is (unless IN1_ROOT is already set), for state storage only. Tool installation still follows a public in-1 prefix or defaults to ${TMPDIR:-/tmp}/in-1.

Keep tools for good

in-1 --local rust node

installs the tools under ~/.local (or /usr/local when root) and writes a wrapper for each command into ~/.local/bin, which is normally already on PATH. The wrappers carry the tools' own environment, so they work from any shell with no setup. Set PREFIX to install somewhere else.

in-1 never overwrites a file in the bin directory that it did not create.

Update

in-1 --update         # update in-1
in-1 --update node    # update, then install node

in-1 tells you when its own clone is behind. It updates makes automatically before installs.

Uninstall

--uninstall uses the same prefix as installation:

in-1 --uninstall rust node  # remove tools installed with --local
in-1 --uninstall in-1       # remove the command and its state
in-1 --temp --uninstall jq  # remove a temporary installation

That removes ~/.local/share/<tool> and the wrappers in ~/.local/bin that in-1 wrote for it, and nothing else. To remove individual session installs, first install in-1 into the session:

source <(curl -sL in-1.cc) in-1
in-1 rust node
in-1 --uninstall rust node

That uninstall removes tools from the same public prefix as in-1 rust node. The curl one-liner itself rejects --uninstall.

For in-1 itself that tree includes ~/.local/share/in-1/local, the state directory; drop the in-1 --rc line from your shell rc file too. Everything else in-1 does lives in a directory; remove it and drop the source line from your shell rc file:

rm -rf /tmp/in-1          # the one-liner's clone, installs and cache
rm -rf ~/.in-1            # a development checkout and its state

Requirements

git, curl, GNU make and bash on PATH, on Linux or macOS (Intel or ARM). Everything else is auto-installed.

See Usage for every option and environment variable.