Install
$ agentstack add skill-encoredev-skills-go-getting-started Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
⚠ Flagged1 finding(s); flagged for manual review. · v0.1.0 How review works →
- • Prompt-injection patterns
- • Secret / credential exfiltration
- • Dangerous shell & filesystem operations
- • Untrusted network calls
- • Known-malicious package signatures
- high Pipes remote content directly into a shell (remote code execution).
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Getting Started with Encore Go
Instructions
Install Encore CLI
# macOS
brew install encoredev/tap/encore
# Linux/WSL
curl -L https://encore.dev/install.sh | bash
# Windows (PowerShell)
iwr https://encore.dev/install.ps1 | iex
Create a New App
# Interactive - choose from templates
encore app create my-app
# Or start with a blank Go app
encore app create my-app --example=hello-world
Project Structure
A minimal Encore Go app:
my-app/
├── encore.app # App configuration
├── go.mod # Go module
└── hello/ # A service (package with API)
└── hello.go # API endpoints
The encore.app File
// encore.app
{
"id": "my-app"
}
This file marks the root of your Encore app. The id is your app's unique identifier.
Create Your First API
In Encore Go, any package with an //encore:api endpoint becomes a service:
// hello/hello.go
package hello
import "context"
type Response struct {
Message string `json:"message"`
}
//encore:api public method=GET path=/hello
func Hello(ctx context.Context) (*Response, error) {
return &Response{Message: "Hello, World!"}, nil
}
Run Your App
# Start the development server
encore run
# Your API is now available at http://localhost:4000
Open the Local Dashboard
# Opens the local development dashboard
encore run
# Then visit http://localhost:9400
The dashboard shows:
- All your services and endpoints
- Request/response logs
- Database queries
- Traces and spans
Common CLI Commands
| Command | Description | |---------|-------------| | encore run | Start the local development server | | encore test | Run tests (uses go test under the hood) | | encore db shell | Open a psql shell to a database | | encore gen client | Generate API client code | | encore app link | Link to an existing Encore Cloud app |
Add Path Parameters
type GetUserParams struct {
ID string
}
type User struct {
ID string `json:"id"`
Name string `json:"name"`
}
//encore:api public method=GET path=/users/:id
func GetUser(ctx context.Context, params *GetUserParams) (*User, error) {
return &User{ID: params.ID, Name: "John"}, nil
}
Add a Database
// db.go
package hello
import "encore.dev/storage/sqldb"
var db = sqldb.NewDatabase("mydb", sqldb.DatabaseConfig{
Migrations: "./migrations",
})
Create a migration:
-- hello/migrations/1_create_table.up.sql
CREATE TABLE items (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL
);
Query the Database
import "encore.dev/storage/sqldb"
type Item struct {
ID int
Name string
}
func getItem(ctx context.Context, id int) (*Item, error) {
item, err := sqldb.QueryRow[Item](ctx, db, `
SELECT id, name FROM items WHERE id = $1
`, id)
if err != nil {
return nil, err
}
return item, nil
}
Next Steps
- Add more endpoints (see
encore-go-apiskill) - Add authentication (see
encore-go-authskill) - Add Pub/Sub topics (
encore-go-pubsub), cron jobs (encore-go-cron), buckets (encore-go-bucket), secrets (encore-go-secret), or caching (encore-go-cache) - Deploy to Encore Cloud:
encore app linkthengit push encore
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: encoredev
- Source: encoredev/skills
- License: Apache-2.0
- Homepage: https://encore.dev
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.