Instalace DFinity SDK

Instalace DFinity SDK

Instalace DFinity Canister Software Development Kitu (SDK) je hezky popsána v dokumentaci na sdk.dfinity.org/docs/quickstart/local-quickstart.html. Tento příspěvek čerpá z uvedeného webu a pouze doplňuje pár informací k instalaci na Ubuntu. Je třeba mít nainstalován node.js.

Stažení a instalaci SDK provedete příkazem sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"

sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
info: Executing DFINITY SDK install script, commit: 4ae0715c2aeb0edb75487a1d0927626f34e26969
The DFINITY Canister SDK
Copyright 2021 DFINITY Stiftung. All Rights Reserved.
The DFINITY Canister SDK (the "Software") is licensed under the Alpha DFINITY
Canister SDK License Agreement (the "License"). You may not use the Software
except in compliance with the License. You may obtain a copy of the License at
    https://sdk.dfinity.org/sdk-license-agreement.txt
The Software is provided to you AS IS and WITHOUT WARRANTY.
Do you agree and wish to install the DFINITY Canister SDK [y/N]?
y
info: Version found: 0.6.26
info: Creating uninstall script in ~/.cache/dfinity
info: uninstall path=/home/vitfo/.cache/dfinity/uninstall.sh
info: Checking for latest release...
Will install in: /home/vitfo/bin
info: Installed /home/vitfo/bin/dfx

Ve vaší domovské složce přibyde adresář ~/bin se spustitelným souborem dfx. Pokud chcete spouštět dfx přímo, přidejte si ~/bin do path (viz tento příspěvek). To že instalace proběhla správně zjistíte zadáním příkazu dfx --version

dfx 0.6.26

Nápovědu získáte volbou dfx --help.

dfx 0.6.26
The DFINITY Executor

USAGE:
    dfx [FLAGS] [OPTIONS] 

FLAGS:
    -h, --help       Prints help information
    -q, --quiet      
    -v, --verbose    
    -V, --version    Prints version information

OPTIONS:
        --identity     
        --logfile       
        --log           [default: stderr] [possible values: stderr, tee, file]

SUBCOMMANDS:
    bootstrap    Starts the bootstrap server
    build        Builds all or specific canisters from the code in your project. By default, all
                 canisters are built
    cache        Manages the dfx version cache
    canister     Manages canisters deployed on a network replica
    config       Configures project options for your currently-selected project
    deploy       Deploys all or a specific canister from the code in your project. By default,
                 all canisters are deployed
    help         Prints this message or the help of the given subcommand(s)
    identity     Manages identities used to communicate with the Internet Computer network.
                 Setting an identity enables you to test user-based access controls
    new          Creates a new project
    ping         Pings an Internet Computer network and returns its status
    replica      Starts a local Internet Computer replica
    start        Starts the local replica and a web server for the current project
    stop         Stops the local network replica
    toolchain    Manage the dfx toolchains
    upgrade      Upgrade DFX

Napsat komentář