Skip to content

Command-line

The command-line client ships alongside the daemon. Usage information for all commands, including sub-commands, is available via the --help flag.

textile [<flags>]

Textile is a set of tools and trust-less infrastructure for building censorship resistant and privacy preserving applications
FlagDescription
--help
Show context-sensitive help (also try --help-long and --help-man).
--help-long
Generate long help.
--help-man
Generate a man page.
--completion-bash
Output possible completions for the given args.
--completion-script-bash
Generate completion script for bash.
--completion-script-zsh
Generate completion script for ZSH.
--api="http://127.0.0.1:40600"
API Address to use
--api-version="v0"
API version to use
--debug
Set the logging level to debug

textile help [<command>]

Show help.
ArgumentDescription
[<command>]
Show help on command.

textile account

Manage the account that the initialised textile repository is associated with

textile account get

Shows the local peer's account info as a contact

textile account seed

Shows the local peer's account seed, treat this as top secret

textile account address

Shows the local peer's account address

textile account sync [<flags>]

Syncs the local account peer with other peers found on the network
FlagDescription
--wait=2
Stops searching after 'wait' seconds have elapsed (max 30s)

textile block

Threads are composed of an append-only log of blocks, use these commands to manage them

textile block list [<flags>] <thread>

Paginates blocks in a thread
FlagDescription
-o, --offset=OFFSET
Offset ID to start listing from
-l, --limit=5
List page size
-d, --dots
Return GraphViz dots instead of JSON
ArgumentDescription
<thread>
Thread ID

textile block meta <block>

Get the metadata for a block
ArgumentDescription
<block>
Block ID

textile block ignore <block>

Remove a block by marking it to be ignored
ArgumentDescription
<block>
Block ID

textile block files

Commands to interact with File Blocks

textile block files list <block>

List all files within a File Block
ArgumentDescription
<block>
File Block ID

textile block files get [<flags>] <block>

Get a specific file within the File Block
FlagDescription
--index=0
The index of the file to fetch
--path="."
The link path of the file to fetch
--content
If provided, the decrypted content of the file is retrieved
ArgumentDescription
<block>
File Block ID

textile cafe

Commands to manage cafes

textile cafe add --token=TOKEN <peer>

Registers with a cafe and saves an expiring service session token.
An access token is required to register, and should be obtained separately from the target cafe.
FlagDescription
-t, --token=TOKEN
An access token supplied by the cafe
ArgumentDescription
<peer>
The host cafe's IPFS peer ID

textile cafe list

List info about all active cafe sessions

textile cafe get <cafe>

Gets and displays info about a cafe session
ArgumentDescription
<cafe>
Cafe ID

textile cafe delete <cafe>

Deregisters a cafe (content will expire based on the cafe's service rules)
ArgumentDescription
<cafe>
Cafe ID

textile cafe messages

Check for messages at all cafes. New messages are downloaded and processed opportunistically.

textile chat <thread>

Starts an interactive chat session in a thread
ArgumentDescription
<thread>
Thread ID

textile comment

Comments are added as blocks in a thread, which target another block, usually a file(s)

textile comment add <block> <body>

Attach a comment to a block
ArgumentDescription
<block>
The Block ID to attach the comment to
<body>
Text to use as the comment

textile comment list <block>

Get the comments that are attached to a block
ArgumentDescription
<block>
The Block ID which the comments attached to

textile comment get <comment-block>

Get a comment by its own Block ID
ArgumentDescription
<comment-block>
Comment Block ID

textile comment ignore <comment-block>

Ignore a comment by its own Block ID
ArgumentDescription
<comment-block>
Comment Block ID

textile config [<name> [<value>]]

Get or set configuration variables
ArgumentDescription
[<name>]
If provided, will restrict the operation to this specific configuration variable, e.g. 'Addresses.API'
[<value>]
If provided, will set the specific configuration variable to this JSON escaped value, e.g. '"127.0.0.1:40600"'

textile contact

Manage local contacts and find other contacts on the network

textile contact add [<flags>]

Adds a contact by display name or account address to known contacts
FlagDescription
-n, --name=NAME
Add by display name
-a, --address=ADDRESS
Add by account address
--wait=WAIT
Stops searching after [wait] seconds have elapsed

textile contact list

List known contacts

textile contact get <address>

Gets a known local contact
ArgumentDescription
<address>
Account Address

textile contact delete <address>

Deletes a known contact
ArgumentDescription
<address>
Account Address

textile contact search [<flags>]

Searches locally and on the network for contacts
FlagDescription
-n, --name=NAME
Search by display name
-a, --address=ADDRESS
Search by account address
--only-local
Only search local contacts
--only-remote
Only search remote contacts
--limit=5
Stops searching after [limit] results are found
--wait=2
Stops searching after [wait] seconds have elapsed (max 30s)

textile daemon [<flags>]

Start a node daemon session
FlagDescription
-r, --repo=REPO
Specify a custom repository path
-p, --pin=PIN
Specify the pin code for datastore encryption (omit no pin code was used during init)
-s, --serve-docs
Whether to serve the local REST API docs

textile docs

Prints the CLI help as HTML

textile feed [<flags>] [<thread>]

Paginates post (join|leave|files|message) and annotation (comment|like) block types as a consumable feed.

The --mode option dictates how the feed is displayed:

  • "chrono": All feed block types are shown. Annotations always nest their target post, i.e., the post a comment is about.
  • "annotated": Annotations are nested under post targets, but are not shown in the top-level feed.
  • "stacks": Related blocks are chronologically grouped into "stacks". A new stack is started if an unrelated block breaks continuity. This mode is used by Textile Photos.

Stacks may include:

  • The initial post with some nested annotations. Newer annotations may have already been listed.
  • One or more annotations about a post. The newest annotation assumes the "top" position in the stack. Additional annotations are nested under the target. Newer annotations may have already been listed in the case as well.
FlagDescription
-o, --offset=OFFSET
Offset ID to start listening from
-l, --limit=3
List page size
-m, --mode="chrono"
Feed mode, one of: chrono, annotated, stacks
ArgumentDescription
[<thread>]
Thread ID, omit for all

textile file

Manage Textile Files Blocks

textile file list

Get all the files, or just the files for a specific thread or block

textile file list thread [<flags>] [<thread>]

Paginates the files of a thread, or of all threads
FlagDescription
-o, --offset=OFFSET
Offset ID to start listing from
-l, --limit=5
List page size
ArgumentDescription
[<thread>]
Thread ID, omit for all

textile file list block

Commands to interact with File Blocks

textile file list block list <block>

List all files within a File Block
ArgumentDescription
<block>
File Block ID

textile file list block get [<flags>] <block>

Get a specific file within the File Block
FlagDescription
--index=0
The index of the file to fetch
--path="."
The link path of the file to fetch
--content
If provided, the decrypted content of the file is retrieved
ArgumentDescription
<block>
File Block ID

textile file keys <block-data>

Shows the encryption keys for each content/meta pair for the given block DAG
ArgumentDescription
<block-data>
Block Data ID

textile file add [<flags>] <thread> [<path>]

Adds a file, directory, or hash to a thread. Files not supported by the thread schema are ignored
FlagDescription
-c, --caption=CAPTION
File(s) caption
-g, --group
If provided, group a directory's files together into a single object, includes nested directories
-v, --verbose
Prints files as they are milled
ArgumentDescription
<thread>
Thread ID
[<path>]
The path to the file or directory to add, can also be an existing hash. If omitted, you must provide a stdin blob input.

textile file ignore <files-block>

Ignores a thread file by its own block ID
ArgumentDescription
<files-block>
Files Block ID

textile file get [<flags>] <hash>

Get the metadata or content of a specific file
FlagDescription
--content
If provided, the decrypted content of the file is retrieved
ArgumentDescription
<hash>
File Hash

textile init [<flags>] <account-seed>

Configure textile to use the account by creating a local repository to house its data
FlagDescription
-p, --pin=PIN
Specify a pin for datastore encryption
-r, --repo=REPO
Specify a custom repository path
--server
Apply IPFS server profile
--swarm-ports=SWARM-PORTS
Set the swarm ports (TCP,WS). A random TCP port is chosen by default
--log-files
If true, writes logs to rolling files, if false, writes logs to stdout
--api-bind-addr="127.0.0.1:40600"
Set the local API address
--cafe-bind-addr="0.0.0.0:40601"
Set the cafe REST API address
--gateway-bind-addr="127.0.0.1:5050"
Set the IPFS gateway address
--profile-bind-addr="127.0.0.1:6060"
Set the profiling address
--cafe
Open the p2p cafe service for other peers
--cafe-open
Open the p2p cafe service for other peers
--cafe-url=CAFE-URL
Specify a custom URL of this cafe, e.g., https://mycafe.com
--cafe-neighbor-url=CAFE-NEIGHBOR-URL
Specify the URL of a secondary cafe. Must return cafe info, e.g., via a Gateway: https://my-gateway.yolo.com/cafe, or a cafe API: https://my-cafe.yolo.com
ArgumentDescription
<account-seed>
The account seed to use, if you do not have one, refer to: textile wallet --help

textile invite

Invites allow other users to join threads.

There are two types of invites, direct account-to-account and external:

  • Account-to-account invites are encrypted with the invitee's account address (public key).
  • External invites are encrypted with a single-use key and are useful for onboarding new users.

textile invite create [<flags>] <thread>

Creates a direct account-to-account or external invite to a thread
FlagDescription
-a, --address=ADDRESS
Account Address, omit to create an external invite
--wait=2
Stops searching after [wait] seconds have elapsed (max 30s)
ArgumentDescription
<thread>
Thread ID

textile invite list

Lists all pending thread invites

textile invite accept [<flags>] <id>

Accepts a direct account-to-account or external invite to a thread
FlagDescription
-k, --key=KEY
Key for an external invite
ArgumentDescription
<id>
Invite ID that you have received

textile invite ignore <id>

Ignores a direct account-to-account invite to a thread
ArgumentDescription
<id>
Invite ID that you wish to ignore

textile ipfs

Provides access to some IPFS commands

textile ipfs peer

Shows the local node's IPFS peer ID

textile ipfs swarm

Provides access to a limited set of IPFS swarm commands

textile ipfs swarm connect [<address>]

Opens a new direct connection to a peer address
ArgumentDescription
[<address>]
An IPFS multiaddr, such as: /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ

textile ipfs swarm peers [<flags>]

Lists the set of peers this node is connected to
FlagDescription
-v, --verbose
Display all extra information
-s, --streams
Also list information about open streams for search peer
-l, --latency
Also list information about the latency to each peer
-d, --direction
Also list information about the direction of connection

textile ipfs cat [<flags>] <hash>

Displays the data behind an IPFS CID (hash)
FlagDescription
-k, --key=KEY
Encryption key
ArgumentDescription
<hash>
IPFS CID

textile like

Likes are added as blocks in a thread, which target another block

textile like add <block>

Attach a like to a block
ArgumentDescription
<block>
Block ID to like, usually a file's block

textile like list <block>

Get likes that are attached to a block
ArgumentDescription
<block>
Block ID to like, usually a file's block

textile like get <like-block>

Get a like by its own Block ID
ArgumentDescription
<like-block>
Like Block ID

textile like ignore <like-block>

Ignore a like by its own Block ID
ArgumentDescription
<like-block>
Like Block ID

textile log [<flags>]

List or change the verbosity of one or all subsystems log output. Textile logs piggyback on the IPFS event logs.
FlagDescription
-s, --subsystem=SUBSYSTEM
The subsystem logging identifier, omit for all
-l, --level=LEVEL
One of: debug, info, warning, error, critical. Omit to get current level.
-t, --textile-only
Whether to list/change only Textile subsystems, or all available subsystems

textile message

Manage Textile Messages

textile message add <thread> <body>

Adds a message to a thread
ArgumentDescription
<thread>
Thread ID
<body>
The message to add the thread

textile message list [<flags>] [<thread>]

Paginates thread messages
FlagDescription
-o, --offset=OFFSET
Offset ID to start the listing from
-l, --limit=10
List page size
ArgumentDescription
[<thread>]
Thread ID, omit to paginate all messages

textile message get [<message-block>]

Gets a message by its own Block ID
ArgumentDescription
[<message-block>]
Message Block ID

textile message ignore [<message-block>]

Ignores a message by its own Block ID
ArgumentDescription
[<message-block>]
Message Block ID

textile migrate [<flags>]

Migrate the node repository and exit
FlagDescription
-r, --repo=REPO
Specify a custom repository path
-p, --pin=PIN
Specify the pin for datastore encryption, omit if no pin was used during init

textile notification

Manage notifications that have been generated by thread and account activity

textile notification list

Lists all notifications

textile notification read <id>

Marks a notification as read
ArgumentDescription
<id>
Notification ID, set to [all] to mark all notifications as read

textile ping <address>

Pings another peer on the network, returning [online] or [offline]
ArgumentDescription
<address>
The address of the other peer on the network

textile profile

Manage the profile for your Textile Account, each peer will have its own profile

textile profile get

Gets the local peer profile

textile profile set [<flags>]

Sets the profile name and avatar of the peer
FlagDescription
-n, --name=NAME
Set the peer's display name
-a, --avatar=AVATAR
Set the peer's avatar from an image path (JPEG, PNG, or GIF)

textile observe [<flags>] [<thread>]

Observe updates in a thread or all threads. An update is generated when a new block is added to a thread.
FlagDescription
-k, --type=TYPE ...
Only be alerted to specific type of updates, possible values: merge, ignore, flag, join, announce, leave, text, files comment, like. Can be used multiple times, e.g., --type files --type comment
ArgumentDescription
[<thread>]
Thread ID, omit for all

textile summary

Get a summary of the local node's data

textile thread

Threads are distributed sets of encrypted files, often shared between peers, governed by schemas.
Use this command to add, list, get, and remove threads. See below for additional commands.

Control over thread access and sharing is handled by a combination of the --type and --sharing flags. An immutable member address "whitelist" gives the initiator fine-grained control. The table below outlines access patterns for the thread initiator and the whitelist members. An empty whitelist is taken to be "everyone", which is the default.

Thread type controls read (R), annotate (A), and write (W) access:

private --> initiator: RAW, whitelist: read_only --> initiator: RAW, whitelist: R public --> initiator: RAW, whitelist: RA open --> initiator: RAW, whitelist: RAW

Thread sharing style controls if (Y/N) a thread can be shared:

not_shared --> initiator: N, whitelist: N invite_only --> initiator: Y, whitelist: N shared --> initiator: Y, whitelist: Y

textile thread add [<flags>] <name>

Adds and joins a new thread
FlagDescription
-k, --key=KEY
A locally unique key used by an app to identify this thread on recovery
-t, --type="private"
Set the thread type to one of: private, read_only, public, open
-s, --sharing="not_shared"
Set the thread sharing style to one of: not_shared, invite_only, shared
-w, --whitelist=WHITELIST ...
A contact address. When supplied, the thread will not allow additional peers, useful for 1-1 chat/file sharing. Can be used multiple times to include multiple contacts
--schema=SCHEMA
Thread schema ID. Supersedes schema filename
--schema-file=SCHEMA-FILE
Thread schema filename, supersedes the built-in schema flags
--blob
Use the built-in blob schema for generic data
--camera-roll
Use the built-in camera roll schema
--media
Use the built-in media schema
ArgumentDescription
<name>
The name to use for the new thread

textile thread list

Lists info on all threads

textile thread get <thread>

Gets and displays info about a thread
ArgumentDescription
<thread>
Thread ID

textile thread peer <thread>

Lists all peers in a thread
ArgumentDescription
<thread>
Thread ID

textile thread rename <thread> <name>

Renames a thread. Only the initiator of a thread can rename it.
ArgumentDescription
<thread>
Thread ID
<name>
The name to rename the thread to

textile thread abandon <thread>

Abandon a thread. If no one is else remains participating, the thread dissipates.
ArgumentDescription
<thread>
Thread ID

textile thread snapshot

Manage thread snapshots

textile thread snapshot create

Snapshots all threads and pushes to registered cafes

textile thread snapshot search [<flags>]

Searches the network for thread snapshots
FlagDescription
-w, --wait=2
Stops searching after [wait] seconds have elapse (max 30s)

textile thread snapshot apply [<flags>] <snapshot>

Applies a single thread snapshot
FlagDescription
-w, --wait=2
Stops searching after [wait] seconds have elapse (max 30s)
ArgumentDescription
<snapshot>
The ID of the snapshot to apply

textile thread files [<flags>] [<thread>]

Paginates the files of a thread, or of all threads
FlagDescription
-o, --offset=OFFSET
Offset ID to start listing from
-l, --limit=5
List page size
ArgumentDescription
[<thread>]
Thread ID, omit for all

textile thread blocks [<flags>] <thread>

Paginates blocks in a thread
FlagDescription
-o, --offset=OFFSET
Offset ID to start listing from
-l, --limit=5
List page size
-d, --dots
Return GraphViz dots instead of JSON
ArgumentDescription
<thread>
Thread ID

textile token

Tokens allow other peers to register with a cafe peer

textile token add [<flags>]

Generates an access token (44 random bytes) and saves a bcrypt hashed version for future lookup.
The response contains a base58 encoded version of the random bytes token.
FlagDescription
-n, --no-store
If used instead of token, the token is generated but not stored in the local cafe database
-t, --token=TOKEN
If used instead of no-store, use this existing token rather than creating a new one

textile token list

List info about all stored cafe tokens

textile token validate <token>

Check validity of existing cafe access token
ArgumentDescription
<token>
The token to validate

textile token delete <token>

Removes an existing cafe token
ArgumentDescription
<token>
The token to delete

textile version [<flags>]

Print the current version and exit
FlagDescription
-g, --git
Show full git version summary

textile wallet

Create a new wallet, or list its available accounts

textile wallet create [<flags>] [<passphrase>]

Generate a hierarchical deterministic wallet and output the first child account. A wallet is a seed that deterministically generates child accounts. Child accounts are used to interact with textile. Formula: Autogenerated Mnemonic + Optionally Specified Passphrase = Generated Seed. The seed, mnemonic, and passphrase must be kept top secret. The mnemonic and passphrase must be remembered by you.
FlagDescription
-w, --words=12
How many words to use for the autogenerated mnemonic? 12, 15, 18, 21, 24
ArgumentDescription
[<passphrase>]
If provided, the resultant wallet seed will be salted with this passphrase, resulting in a different (and more unique) wallet seed than if just the mnemonic was used.

textile wallet accounts [<flags>] <mnemonic> [<passphrase>]

List the available accounts (within a specific range) within the wallet's deterministic bounds. Formula: Account = Account Index + Parent Private Key from Parent Seed. Parent Seed = Wallet Mnemonic + Passphrase.
FlagDescription
-d, --depth=1
Number of accounts to show
-o, --offset=0
Account depth to start from
ArgumentDescription
<mnemonic>
The autogenerated mnemonic of the wallet
[<passphrase>]
If the wallet was generated with a passphrase, specify it here to ensure the accounts you are listing are for the same wallet