github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/getting-started/playground-start.md (about)

     1  ---
     2  id: playground-start
     3  ---
     4  
     5  # Gno Playground
     6  
     7  ## Overview
     8  
     9  The Gno Playground is an innovative web-based editor and sandbox that enables developers to 
    10  interactively work with the Gno language. It makes coding, testing,
    11  and deploying simple with its diverse set of tools and features. Users can
    12  share code, run tests, and deploy projects to Gno.land networks, 
    13  making it the perfect tool to get started with Gno development.
    14  
    15  ## Prerequisites
    16  
    17  - **A Gno.land compatible wallet**
    18    - Currently, [Adena](https://www.adena.app/) is the preferred wallet for
    19  Gno.land, with more wallets being introduced in the future.
    20  
    21  ## Playground Features
    22  
    23  To get started, visit the Playground at [play.gno.land](https://play.gno.land). You will be greeted with a
    24  simple `package.gno` file:
    25  
    26  ![default_playground](../assets/getting-started/playground/default_playground.png)
    27  
    28  The Playground has the following features:
    29  - `Share` - Generate a unique, short, and shareable identifier for your Gno code.
    30  - `Deploy` - Connect your wallet and publish your code on Gno.land.
    31  - `Format` - Automatically adjust your Gno code's structure and style for optimal readability and consistency.
    32  - `Run` - Execute a particular expression within your code to validate its functionality and output.
    33  - `Test` - Execute predefined tests to verify your code's integrity and ensure it meets expected outcomes.
    34  - `REPL` - Experiment and troubleshoot in real-time using the GnoVM with interactive REPL features.
    35  
    36  Let's dive into each of the Playground features.
    37  
    38  ### Share
    39  
    40  The **Share** feature provides users with a permanent shortlink to the current
    41  Gno code in the playground, making it a simple and easy way to do code-sharing.
    42  Links created via the **Share** feature initially set to expire after 5 years,
    43  ensuring the shared code remains accessible over an extended period.
    44  
    45  ### Deploy
    46  
    47  The **Deploy** feature allows users to seamlessly deploy their Gno code to the 
    48  chain. After connecting a Gno.land wallet, users can select their desired 
    49  package path and network for deployment.
    50  
    51  ![default_deploy](../assets/getting-started/playground/default_deploy.png)
    52  
    53  After inputting your desired package path, you can select the network you would 
    54  like to deploy to, such as [Portal Loop](../concepts/portal-loop.md) or local,
    55  and click deploy.
    56  
    57  :::info
    58  The Playground will automatically provide enough test tokens to cover the gas 
    59  cost at the time of deployment, removing the need for using a faucet.
    60  :::
    61  
    62  ### Format
    63  
    64  The **Format** feature utilizes the Monaco editor and
    65  [`gofmt`](https://pkg.go.dev/cmd/gofmt) to automatically refine and standardize 
    66  your Gno code's syntax.
    67  
    68  ### Run
    69  
    70  The **Run** feature will allow you to run an expression on your Gno code. Take the following code
    71  for an example:
    72  
    73  [![run_example](../assets/getting-started/playground/run.png)](https://play.gno.land/p/nBq2W8drjMy)
    74  
    75  Running `println(Render("Gnopher"))` will display the following output:
    76  
    77  ```bash
    78  Hello Gnopher!
    79  ```
    80  
    81  View the code [here](https://play.gno.land/p/nBq2W8drjMy).
    82  
    83  ### Test
    84  
    85  The **Test** feature will look for `_test.gno` files in your playground and run 
    86  the`gno test -v` command on them. Testing your code will open a terminal that
    87  will show you the output of the test. Read more about how Gno tests work
    88  [here](../concepts/gno-test.md).
    89  
    90  ### REPL (experimental)
    91  
    92  The **REPL** feature allows you to experiment with the GnoVM.
    93  It provides a command-line interface for hands-on learning, iterative testing, and swift prototyping.
    94  
    95  ## Learning about Gno.land & writing Gno code
    96  
    97  If you're new here, don't worry—content is regularly produced to breakdown
    98  Gno.land to explain its features. Dive into the essentials of Gno.land by 
    99  exploring the [Concepts](../concepts/concepts.md) section.
   100  
   101  To get started writing Gno code, check out the
   102  [How-to](../how-to-guides/how-to-guides.md) section, the `examples/` folder on
   103  the [Gno monorepo](https://github.com/gnolang/gno), or one of many community projects and tutorials found in the 
   104  [awesome-gno](https://github.com/gnolang/awesome-gno/blob/main/README.md) repo on GitHub.