Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: kubo v0.24.0 #1772

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/styles/pln-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Arbol's
auditable
Audius
auspinner
autogenerated
BitSwap
bitswap
Blockchain
Expand Down
118 changes: 58 additions & 60 deletions docs/reference/kubo/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ description: API documentation for the Kubo command-line executable.

# Kubo command-line

::: tip Generated on 2023-10-05 18:30:12, from kubo 0.23.0
This document was autogenerated from CLI help text in [kubo 0.23.0](https://github.com/ipfs/kubo/releases/tag/v0.23.0)
::: tip Generated on 2023-12-01 00:47:48, from kubo 0.24.0
This document was autogenerated from CLI help text in [kubo 0.24.0](https://github.com/ipfs/kubo/releases/tag/v0.24.0)
For issues and support, check out the [generate-cli-docs.sh](https://github.com/ipfs/ipfs-docs/blob/main/docs/reference/kubo/generate-cli-docs.sh) script on GitHub.
:::

<!-- DO NOT EDIT THIS FILE. This file is auto-generated from `generate-cli-docs.sh`. Any changes you make to this file will be overwritten. To edit this file, change the contents of the `generate-cli-docs.sh` script. -->

IPFS can run in either _online_ or _offline_ mode. Online mode is when you have IPFS running separately as a daemon process. If you do not have an IPFS daemon running, you are in offline mode. Some commands, like `ipfs swarm peers`, are only supported when online.

The [command-line quickstart guide](/how-to/command-line-quick-start/#take-your-node-online) explains how to start the IPFS daemon and take your node online.
The [command-line quickstart guide](../../how-to/command-line-quick-start.md) explains how to start the IPFS daemon and take your node online.



### Alignment with Kubo RPC API

Every command usable from the CLI is also available through the [RPC API v0](/reference/kubo/rpc). For example:
Every command usable from the CLI is also available through the [RPC API v0](../../reference/kubo/rpc.md). For example:

```sh
> ipfs swarm peers
Expand Down Expand Up @@ -1070,13 +1070,35 @@ SYNOPSIS
DESCRIPTION

Available profiles:
'lowpower':
Reduces daemon overhead on the system. May affect node
functionality - performance of content discovery and data
fetching may be degraded.
'flatfs':
Configures the node to use the flatfs datastore.

'randomports':
Use a random port number for swarm.
This is the most battle-tested and reliable datastore.
You should use this datastore if:

* You need a very simple and very reliable datastore, and you trust your
filesystem. This datastore stores each block as a separate file in the
underlying filesystem so it's unlikely to loose data unless there's an issue
with the underlying file system.
* You need to run garbage collection in a way that reclaims free space as soon as possible.
* You want to minimize memory usage.
* You are ok with the default speed of data import, or prefer to use --nocopy.

This profile may only be applied when first initializing the node.

'local-discovery':
Sets default values to fields affected by the server
profile, enables discovery in local networks.
'default-datastore':
Configures the node to use the default datastore (flatfs).

Read the "flatfs" profile description for more information on this datastore.

This profile may only be applied when first initializing the node.

'default-networking':
Restores default network settings.
Inverse profile of the test profile.
'badgerds':
Configures the node to use the experimental badger datastore.

Expand All @@ -1095,41 +1117,19 @@ DESCRIPTION
which is no longer supported by the upstream team.

This profile may only be applied when first initializing the node.
'lowpower':
Reduces daemon overhead on the system. May affect node
functionality - performance of content discovery and data
fetching may be degraded.

'randomports':
Use a random port number for swarm.
'server':
Disables local host discovery, recommended when
running IPFS on machines with public IPv4 addresses.
'local-discovery':
Sets default values to fields affected by the server
profile, enables discovery in local networks.
'test':
Reduces external interference of IPFS daemon, this
is useful when using the daemon in test environments.
'default-networking':
Restores default network settings.
Inverse profile of the test profile.
'default-datastore':
Configures the node to use the default datastore (flatfs).

Read the "flatfs" profile description for more information on this datastore.

This profile may only be applied when first initializing the node.

'flatfs':
Configures the node to use the flatfs datastore.

This is the most battle-tested and reliable datastore.
You should use this datastore if:

* You need a very simple and very reliable datastore, and you trust your
filesystem. This datastore stores each block as a separate file in the
underlying filesystem so it's unlikely to loose data unless there's an issue
with the underlying file system.
* You need to run garbage collection in a way that reclaims free space as soon as possible.
* You want to minimize memory usage.
* You are ok with the default speed of data import, or prefer to use --nocopy.

This profile may only be applied when first initializing the node.


SUBCOMMANDS
ipfs config profile apply <profile> - Apply profile to config.
Expand Down Expand Up @@ -3382,9 +3382,9 @@ USAGE
ipfs name publish <ipfs-path> - Publish IPNS names.

SYNOPSIS
ipfs name publish [--resolve=false] [--lifetime=<lifetime> | -t]
[--allow-offline] [--ttl=<ttl>] [--key=<key> | -k]
[--quieter | -Q] [--v1compat=false]
ipfs name publish [--key=<key> | -k] [--resolve=false]
[--lifetime=<lifetime> | -t] [--ttl=<ttl>] [--quieter | -Q]
[--v1compat=false] [--allow-offline]
[--ipns-base=<ipns-base>] [--] <ipfs-path>

ARGUMENTS
Expand All @@ -3393,26 +3393,24 @@ ARGUMENTS

OPTIONS

--resolve bool - Check if the given path can be resolved before
publishing. Default: true.
-t, --lifetime string - Time duration that the record will be valid for.
Default: 24h.
This accepts durations such as
"300s", "1.5h" or "2h45m". Valid time units are

"ns", "us" (or "µs"), "ms", "s", "m", "h".
--allow-offline bool - When offline, save the IPNS record to the the local
datastore without broadcasting to the network
instead of simply failing.
--ttl string - Time duration this record should be cached for.
Uses the same syntax as the lifetime option.
(caution: experimental).
-k, --key string - Name of the key to be used or a valid PeerID, as
listed by 'ipfs key list -l'. Default: self.
-Q, --quieter bool - Write only final hash.
--resolve bool - Check if the given path can be resolved before
publishing. Default: true.
-t, --lifetime string - Time duration the signed record will be valid for.
Accepts durations such as "300s", "1.5h" or
"7d2h45m". Default: 48h0m0s.
--ttl string - Time duration hint, akin to --lifetime, indicating
how long to cache this record before checking for
updates. Default: 1h0m0s.
-Q, --quieter bool - Write only final IPNS Name encoded as CIDv1 (for
use in /ipns content paths).
--v1compat bool - Produce a backward-compatible IPNS Record by
including fields for both V1 and V2 signatures.
Default: true.
--allow-offline bool - When --offline, save the IPNS record to the the
local datastore without broadcasting to the network
(instead of failing).
--ipns-base string - Encoding used for keys: Can either be a multibase
encoded CID or a base58btc encoded multihash. Takes
{b58mh|base36|k|base32|b...}. Default: base36.
Expand Down Expand Up @@ -3440,7 +3438,7 @@ DESCRIPTION
> ipfs name publish --key=mykey /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
Published to QmSrPmbaUKA3ZodhzPWZnpFgcPMFWF4QsxXbkWfEptTBJd: /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy

Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
Alternatively, publish an <ipfs-path> using a valid PeerID (as listed by
'ipfs key list -l'):

> ipfs name publish --key=QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n /ipfs/QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
Expand Down Expand Up @@ -3548,10 +3546,10 @@ OPTIONS
name. Default: true.
-n, --nocache bool - Do not use cached entries.
--dhtrc, --dht-record-count uint - Number of records to request for DHT
resolution.
resolution. Default: 16.
--dhtt, --dht-timeout string - Max time to collect values during DHT
resolution eg "30s". Pass 0 for no
timeout.
timeout. Default: 1m0s.
-s, --stream bool - Stream entries as they are found.

DESCRIPTION
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/kubo/generate-cli-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ For issues and support, check out the [generate-cli-docs.sh](https://github.com/

IPFS can run in either _online_ or _offline_ mode. Online mode is when you have IPFS running separately as a daemon process. If you do not have an IPFS daemon running, you are in offline mode. Some commands, like \`ipfs swarm peers\`, are only supported when online.

The [command-line quickstart guide](/how-to/command-line-quick-start/#take-your-node-online) explains how to start the IPFS daemon and take your node online.
The [command-line quickstart guide](../..//how-to/command-line-quick-start.md) explains how to start the IPFS daemon and take your node online.

"

echo "
### Alignment with Kubo RPC API

Every command usable from the CLI is also available through the [RPC API v0](/reference/kubo/rpc). For example:
Every command usable from the CLI is also available through the [RPC API v0](../../reference/kubo/rpc.md). For example:

\`\`\`sh
> ipfs swarm peers
Expand Down
24 changes: 11 additions & 13 deletions docs/reference/kubo/rpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ I AM SERIOUS, DO NOT EDIT ANYTHING BELOW ;-D

-->

::: tip Generated on 2023-10-05, from kubo v0.23.0
This document was autogenerated from [v0.23.0](https://github.com/ipfs/kubo/releases/tag/v0.23.0).
::: tip Generated on 2023-12-01, from kubo v0.24.0
This document was autogenerated from [v0.24.0](https://github.com/ipfs/kubo/releases/tag/v0.24.0).
For issues and support, check out the [http-api-docs](https://github.com/ipfs/ipfs-docs/tree/main/tools/http-api-docs) generator on GitHub.
:::

Expand Down Expand Up @@ -2274,15 +2274,13 @@ Publish IPNS names.
### Arguments

- `arg` [string]: ipfs path of the object to be published. Required: **yes**.
- `resolve` [bool]: Check if the given path can be resolved before publishing. Default: `true`. Required: no.
- `lifetime` [string]: Time duration that the record will be valid for.
This accepts durations such as &#34;300s&#34;, &#34;1.5h&#34; or &#34;2h45m&#34;. Valid time units are
&#34;ns&#34;, &#34;us&#34; (or &#34;µs&#34;), &#34;ms&#34;, &#34;s&#34;, &#34;m&#34;, &#34;h&#34;. Default: `24h`. Required: no.
- `allow-offline` [bool]: When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing. Required: no.
- `ttl` [string]: Time duration this record should be cached for. Uses the same syntax as the lifetime option. (caution: experimental). Required: no.
- `key` [string]: Name of the key to be used or a valid PeerID, as listed by &#39;ipfs key list -l&#39;. Default: `self`. Required: no.
- `quieter` [bool]: Write only final hash. Required: no.
- `resolve` [bool]: Check if the given path can be resolved before publishing. Default: `true`. Required: no.
- `lifetime` [string]: Time duration the signed record will be valid for. Accepts durations such as &#34;300s&#34;, &#34;1.5h&#34; or &#34;7d2h45m&#34;. Default: `48h0m0s`. Required: no.
- `ttl` [string]: Time duration hint, akin to --lifetime, indicating how long to cache this record before checking for updates. Default: `1h0m0s`. Required: no.
- `quieter` [bool]: Write only final IPNS Name encoded as CIDv1 (for use in /ipns content paths). Required: no.
- `v1compat` [bool]: Produce a backward-compatible IPNS Record by including fields for both V1 and V2 signatures. Default: `true`. Required: no.
- `allow-offline` [bool]: When --offline, save the IPNS record to the the local datastore without broadcasting to the network (instead of failing). Required: no.
- `ipns-base` [string]: Encoding used for keys: Can either be a multibase encoded CID or a base58btc encoded multihash. Takes {b58mh|base36|k|base32|b...}. Default: `base36`. Required: no.


Expand All @@ -2300,7 +2298,7 @@ On success, the call to this endpoint will return with 200 and the following bod

### cURL Example

`curl -X POST "http://127.0.0.1:5001/api/v0/name/publish?arg=<ipfs-path>&resolve=true&lifetime=24h&allow-offline=<value>&ttl=<value>&key=self&quieter=<value>&v1compat=true&ipns-base=base36"`
`curl -X POST "http://127.0.0.1:5001/api/v0/name/publish?arg=<ipfs-path>&key=self&resolve=true&lifetime=48h0m0s&ttl=1h0m0s&quieter=<value>&v1compat=true&allow-offline=<value>&ipns-base=base36"`

---

Expand All @@ -2314,8 +2312,8 @@ Resolve IPNS names.
- `arg` [string]: The IPNS name to resolve. Defaults to your node&#39;s peerID. Required: no.
- `recursive` [bool]: Resolve until the result is not an IPNS name. Default: `true`. Required: no.
- `nocache` [bool]: Do not use cached entries. Required: no.
- `dht-record-count` [uint]: Number of records to request for DHT resolution. Required: no.
- `dht-timeout` [string]: Max time to collect values during DHT resolution eg &#34;30s&#34;. Pass 0 for no timeout. Required: no.
- `dht-record-count` [uint]: Number of records to request for DHT resolution. Default: `16`. Required: no.
- `dht-timeout` [string]: Max time to collect values during DHT resolution e.g. &#34;30s&#34;. Pass 0 for no timeout. Default: `1m0s`. Required: no.
- `stream` [bool]: Stream entries as they are found. Required: no.


Expand All @@ -2332,7 +2330,7 @@ On success, the call to this endpoint will return with 200 and the following bod

### cURL Example

`curl -X POST "http://127.0.0.1:5001/api/v0/name/resolve?arg=<name>&recursive=true&nocache=<value>&dht-record-count=<value>&dht-timeout=<value>&stream=<value>"`
`curl -X POST "http://127.0.0.1:5001/api/v0/name/resolve?arg=<name>&recursive=true&nocache=<value>&dht-record-count=16&dht-timeout=1m0s&stream=<value>"`

---

Expand Down