# Threads on Atuin Hub

Atuin Hub allows you to see all your threads at-a-glance, as well as compute
statistics of your threads usage.

## Uploading

Ensure you are syncing your threads by enabling Hub support in `atuin setup
--hub`. You can control whether you want to upload all your data to Atuin Hub,
or whether you want to upload data within workspaces which contain an
`.atuin.lua` configuration file.

After completing Atuin Hub setup, try starting a new thread in your favorite
harness. Atuin will upload your thread in real-time, as you write messages.

TODO SCREEN RECORDING

You can then visit https://atuin.sh/threads to see your new thread. If you've
enabled backfill, you will also see your older threads as they are uploaded.

## Sharing

Opening a thread in the browser allows you to share it with anyone. You can
either share it via link, or you can share with organizations you're a member
of.

## Workspaces

Atuin workspaces are directories which contain a `.atuin.lua` configuration
file. This file allows you to configure _what_ and _how_ you want your threads
to behave within a project.

```lua title=".atuin.lua"
-- atuin:version=1
atuin.config = {
  -- Configure what gets uploaded.
  upload = {
    -- Upload every thread created in this workspace.
    threads = false,
    -- Upload every command-line history you made in this workspace.
    history = false,
  },
  -- Configure the owner of this workspace.
  --
  -- If you are a member of this org, your data is uploaded as per
  -- the upload section.
  orgs = { "acme-inc" },
}
```

:::tip

To further customize `threads` and `history`, you can pass a custom filter
function:

```lua title=".atuin.lua"
-- atuin:version=1
atuin.config = {
  upload = {
    threads = function(thread)
      return thread["harness"] ~= "codex"
    end,
  },
}
```

:::

Visit the [reference](/reference/config/atuin-lua/) for the workspace
configuration file for more details.