Library for generating IDs in the AID or AIDX format in Java
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-26 13:02:53 -04:00
gradle/wrapper Initial commit 2026-01-07 20:44:46 -05:00
src Release 1.1.0 2026-03-26 13:02:53 -04:00
.gitignore Add publishing configuration 2026-01-07 20:57:19 -05:00
build.gradle.kts Release 1.1.0 2026-03-26 13:02:53 -04:00
gradlew Initial commit 2026-01-07 20:44:46 -05:00
gradlew.bat Initial commit 2026-01-07 20:44:46 -05:00
LICENSE Add LGPL v3 2026-01-07 20:45:52 -05:00
README.md Update README.md 2026-02-17 22:53:20 +01:00
settings.gradle.kts Initial commit 2026-01-07 20:44:46 -05:00

aidx4j

Build Status

Library for generating IDs in the AID or AIDX format in Java.

AID is deprecated since it is no longer default in Misskey and is likely to collide, whereas AIDX is not. It's only included for compatability purposes.

AID is composed of two components: the current time minus time since 2000 (8 chars), then an ending from a global counter (2 chars).

An example AID would be ah8ccctf0j.

AIDX is composed of three components: the current time minus time since 2000 (8 chars), random lowercase letters or numbers (4 chars), then an ending from a global counter (4 chars).

An example AIDX would be ah8ccyxnft8p002p.

Examples

// In Java
public static void main() {
    System.out.println("Generated AIDX " + generateAidx());
}
// In Kotlin
fun main() {
   println("Generated AIDX ${generateAidx()}")
}

Installing

aidx4j is available in the remlit.site repository. You can install it like below.

repositories {
    maven("https://repo.remlit.site/releases")
}

dependencies {
    implementation("site.remlit:aidx4j:1.0.0")
}